Build a music album review system with user authentication.
You can choose between two implementation paths:
- Path A: An Express.js API back-end with comprehensive authentication and validation.
- Path B: A front-end application using Supabase for the back-end services.
Project Requirements
Core Functionality (Both Paths)
Your application must include:
Public Access
- Anyone can view the list of albums.
- Anyone can read comments on albums.
User Authentication
- User registration with email and password.
- User login.
- Show login/register forms only to unauthenticated users (Supabase path only).
- Email confirmation required (Supabase path only).
Album Management
- CRUD operations for music albums.
- Album details: title, artist, genre, release year.
- Only authenticated users can add albums.
- Users can only edit/delete their own albums.
- “Add Album” link visible only when logged in (Supabase path only).
Comments System
- Authenticated users can post comments on any album.
- Comments display publicly with author’s username and timestamp.
- Comment form visible only when logged in (Supabase path only).
- Users can only edit/delete their own comments.
Implementation Paths
Choose one of the following paths:
Path A: Custom Express.js API
Build a complete API back-end (no front-end required).
Technology Stack
- Express.js with TypeScript.
- MySQL database with mysql2.
- JWT authentication with bcrypt password hashing.
- Zod validation schemas.
- OpenAPI/Swagger documentation.
Key Implementation Requirements
- Use Express Router to organise endpoints by resource.
- Implement comprehensive Zod validation for all inputs.
- Create JWT authentication middleware.
- Add authorisation checks for user-specific operations.
- Generate complete OpenAPI documentation.
- Include proper error handling and status codes.
Path B: Supabase Implementation
Build a front-end application using Supabase for the back-end services.
Technology Stack
- Supabase;
- Supabase JavaScript client library.
Advanced Features
- Image Upload: Allow users to upload album cover art using Supabase Storage.
- Real-time Comments: Implement live comment updates using Supabase subscriptions.
What You’ll Create
Your project should demonstrate the Module 3 concepts through a working application:
Path A Requirements
- Working API with all album and comment endpoints.
- JWT authentication with registration and login.
- organised code structure using Express Router and middleware.
- Zod validation for all inputs.
- OpenAPI documentation.
- Basic README with setup and testing instructions.
Path B Requirements
- Working front-end application with HTML, CSS, and JavaScript.
- CRUD operations for albums and comments with proper authorisation.
- Supabase authentication with email confirmation.
- Real-time comment updates using Supabase subscriptions.
- Image upload for album covers using Supabase Storage.
- Basic README with setup instructions.
Tips
- Start with authentication - it’s fundamental to all other features.
- Handle errors gracefully - provide helpful feedback for invalid inputs.
- Consider security - validate all inputs and protect user data.