A recommendation system that provides personalized recommendations for movies and music based on user preferences.
- User and Admin UI: Web frontends for both users and admins.
- Users CRUD: Create, Read, Update, Delete users with preferences.
- Movies CRUD: Manage movie records.
- Music CRUD: Manage music records.
- Recommendations: Personalized recommendations for users based on genres/preferences.
- Redis Caching: Store recommendations for faster responses.
- PostgreSQL Database: Persist users, movies, and music.
- JWT Auth: Signup/login, protect write operations, owner checks.
- Admin Panel: Manage movies, music, and users via a dedicated admin UI.
- Rate Limiting: Prevent abuse with SlowAPI.
- Backend: FastAPI (Python)
- Frontend: HTML/CSS/JS
- Database: PostgreSQL
- Cache: Redis
- Auth: JWT
- Rate Limiting: SlowAPI
- Security Middleware: Starlette (HTTPS redirect, HSTS)
Prerequisite: PostgreSQL and Redis server installed and running on your system.
├── app/ # FastAPI backend (public & admin)
│ ├── main_public.py
│ ├── main_admin.py
│ ├── admin/ # Admin backend & UI
│ ├── public/ # Public API routes
│ ├── services/
│ └── ...
├── frontend/ # User-facing web UI
│ ├── index.html
│ └── user/
├── tests/ # tests
├── requirements.txt
├── README.md
└── ...
git clone https://github.com/iamPulakesh/Curate-API.gitpip install -r requirements.txtuvicorn app.main_public:app --reload --port user_portuvicorn app.main_admin:app --reload --port admin_portPOST /auth/signup→ Create a user with passwordPOST /auth/login→ Get JWT access token- Use header
Authorization: Bearer <token>for protected routes below
PUT /users/update={user_id}→ Update user (protected, self-only)DELETE /users/delete={user_id}→ Delete user (protected, self-only)GET /users/andGET /users/name={name}→ Admin-only
POST /movies/→ Create a movie (protected; Admin-only)GET /movies/→ List movies (public)PUT /movies/update={movie_id}→ Update movie (protected; Admin-only)DELETE /movies/delete={movie_id}→ Delete movie (protected; Admin-only)
POST /music/→ Create a music record (protected; Admin-only)GET /music/→ List music (public)PUT /music/update={music_id}→ Update music (protected; Admin-only)DELETE /music/delete={music_id}→ Delete music (protected; Admin-only)
GET /recommendations/id={user_id}→ Get recommendations for a userGET /recommendations/genres={item_genres}→ Get recommendations based on genre or mood
Signup
{
"name": "alice",
"email": "[email protected]",
"preferences": "rock, pop, Sad",
"password": "secret123"
}Login
{
"name": "alice",
"password": "secret123"
}Feel free to fork, create PRs or raise issues to improve this project.