A simple project to understand how authentication systems work by building one completely from scratch using Bun and native Bun packages.
This project is focused on learning the fundamentals of authentication rather than building a production-ready system or polished UI.
- User registration with email and password
- User login with email and password
- Session management using Redis-stored session tokens
- Rate limiting to prevent abuse
- Bun – JavaScript runtime and package manager
- PostgreSQL – Database for persistent user data
- Redis – In-memory store for managing session data
- Add email verification during registration
- Use HTTPS for secure communication
- Implement refresh tokens for long-lived sessions
- Switch to JWT-based session tokens for stateless authentication
This project is intended for educational purposes only and is not recommended for production use.