feat: add sleep tracking features with leaderboard and user authentication
Some checks failed
Deploy / deploy (push) Failing after 50s

- Implemented a new HomePage component displaying the leaderboard.
- Created Providers component for session management using next-auth.
- Developed Header component for navigation and user authentication.
- Added Leaderboard component to fetch and display sleep data.
- Introduced SleepCard component for individual sleep entries.
- Created SleepForm component for logging sleep data with manual input options.
- Added SleepPhaseBar component to visualize sleep phases.
- Implemented utility functions for formatting and calculating sleep data.
- Set up authentication with Discord using next-auth and Prisma.
- Configured middleware for protected routes.
- Added TypeScript definitions for next-auth session.
- Configured Tailwind CSS for styling.
- Initialized TypeScript configuration for the project.
This commit is contained in:
2026-05-14 23:45:25 +02:00
parent 3c6ad58863
commit 06ff840762
34 changed files with 1671 additions and 0 deletions

37
nginx.example.conf Normal file
View File

@@ -0,0 +1,37 @@
# nginx reverse proxy config voor SlaapKampioen
# Sla op als /etc/nginx/sites-available/slaapkampioen
# en symlink naar /etc/nginx/sites-enabled/
server {
listen 80;
server_name slaap.jouwdomein.be;
# Redirect HTTP → HTTPS
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name slaap.jouwdomein.be;
# SSL (bv. via certbot / Let's Encrypt)
ssl_certificate /etc/letsencrypt/live/slaap.jouwdomein.be/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/slaap.jouwdomein.be/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# Proxy naar Docker container (127.0.0.1:3010 zoals in docker-compose.yml)
location / {
proxy_pass http://127.0.0.1:3010;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 60s;
}
}