- Introduction
- Features
- Technologies Used
- How to Run Locally
- Security & Validation
- License
- Author
- Notes
- Contributing
- Issues
CinemaStash is a backend API for a movie management system built with MongoDB, Express, and Node.js. It supports user authentication, movie wishlist management, reviews, and TMDB API integration for movie data. The frontend is planned but not included.
- 🔐 User Authentication: JWT-based register/login with bcrypt hashing.
- 📝 Wishlist Management: Add, view, remove movies from user wishlist.
- 🌟 Review System: Create, update, delete movie reviews (1–5 rating scale).
- 🎥 TMDB Integration: Fetch movie details and posters by title.
- ✅ Input Validation: express-validator for user, review, and movie routes.
- 🛡️ Security: Protected routes, sensitive data filtering (e.g., password, email).
- Layer
- Backend- Node.js, Express.js, MongoDB (Mongoose)
- API Data - TMDB API
- Authentication - JWT, bcrypt
- Validation - express-validator
- Rate Limiting - express-rate-limit
- Clone the repository:
Install dependencies:
git clone https://github.com/samuelAemro12/CinemaStash.git cd CinemaStash
npm install- Set up .env: Create a .env file in the root directory: env
PORT=5000
MONGO_URI=mongodb://localhost:27017/cinemastash
JWT_SECRET=your_jwt_secret
TMDB_API_KEY=your_tmdb_api_key- Run the server:
npm run startInput Validation: express-validator for user, review, and movie inputs. Auth Middleware: JWT protects wishlist, review, and user routes. Data Filtering: Excludes sensitive fields (e.g., password, email in user.controller.js). Planned: Rate limiting (express-rate-limit), modular validators.
- MIT License.
- Backend-only API; frontend planned.
- Contributions welcome! See Contributing.
- Fork the repository.
-Create a feature branch:
git checkout -b feature/YourFeature-Commit changes:git commit -m 'Add YourFeature-Push to branch:git push origin feature/YourFeature-Open a Pull Request.
Report bugs or suggest features via GitHub Issues.