A modern movie review website built with React, FastAPI, and TMDB API integration.
- Frontend: https://moview-zc1e.onrender.com/
- Backend API: https://moview-backend.onrender.com/
- API Documentation: https://moview-backend.onrender.com/docs




- Movie Search & Discovery: Browse popular movies and search by title
- Movie Details: View comprehensive movie information including cast, synopsis, and ratings
- User Reviews: Submit and read movie reviews from other users
- Rating System: Rate movies and view average ratings
- Sentiment Analysis: Fast, local keyword-based sentiment analysis of reviews
- User Profiles: Personal "My Ratings" page to track your movie reviews
- Responsive Design: Modern UI built with TailwindCSS
- React.js - Modern UI framework with React Router
- TailwindCSS - Utility-first CSS framework with custom animations
- Axios - HTTP client for API requests
- FastAPI - Modern Python web framework with automatic API documentation
- SQLAlchemy - SQL toolkit and ORM with PostgreSQL support
- Pydantic - Data validation using Python type hints
- PostgreSQL - Primary database (compatible with NeonDB)
- UUID Primary Keys - For better scalability and security
- TMDB API - Movie data and images
- Groq API - AI-powered movie recommendations
- Render - Full-stack hosting (FastAPI backend + React frontend)
- NeonDB - PostgreSQL database hosting
- Docker & Docker Compose - Local development containerization
- GitHub Actions - CI/CD pipeline
- Docker and Docker Compose
- TMDB API key (Get it here)
- Groq API key (optional - only for movie recommendations) (Get it here
-
Clone the repository
git clone https://github.com/yusufdemrr/MoView.git cd MoView
-
Environment Configuration
cp env.example .env # Edit .env with your API keys: # TMDB_API_KEY=your_tmdb_api_key_here # GROQ_API_KEY=your_groq_api_key_here # SECRET_KEY=your-secret-key-here
-
Start with Docker Compose
docker-compose up --build
-
Populate Sample Data (Optional)
# Wait for services to start (about 30 seconds), then: python3 -m venv sample_env source sample_env/bin/activate pip install requests python3 create_sample_data.py deactivate && rm -rf sample_env
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Database Admin: http://localhost:8080 (Adminer)
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
# Tables are created automatically on startup
# Start the server
uvicorn main:app --reload
cd frontend
npm install
npm start
id
: UUID - Primary keyusername
: TEXT - User's username (unique)email
: TEXT - User's email (unique)password
: TEXT - Hashed passwordcreated_at
: TIMESTAMP - Account creation date
id
: UUID - Primary keyuser_id
: FK → users.idmovie_id
: INT - TMDB movie IDcontent
: TEXT - Review content (10-1000 characters)rating
: FLOAT - User rating (1.0 - 5.0)sentiment
: TEXT - Keyword-based sentiment analysis result (positive/negative/neutral)created_at
: TIMESTAMP - Review creation date
GET /movies/popular
- Get popular moviesGET /movies/search?q={query}
- Search movies by titleGET /movies/{id}
- Get movie details by ID
POST /reviews/
- Create a new reviewGET /reviews/{movie_id}
- Get all reviews for a movieGET /reviews/user/{user_id}
- Get user's reviewsGET /reviews/stats/{movie_id}
- Get movie rating statistics
POST /auth/register
- Register new userPOST /auth/login
- User login (returns JWT token)GET /auth/me
- Get current user infoPOST /auth/verify-token
- Verify JWT token
POST /sentiment/analyze
- Analyze review sentiment using local keyword-based analysis
GET /reviews/recommendations/{user_id}
- Get AI-powered personalized movie recommendations
MoView/
├── backend/ # FastAPI Backend
│ ├── main.py # FastAPI app entry point
│ ├── database.py # Database configuration
│ ├── models/ # SQLAlchemy models
│ │ ├── __init__.py
│ │ ├── user.py # User model
│ │ └── review.py # Review model
│ ├── routers/ # API route handlers
│ │ ├── __init__.py
│ │ ├── auth.py # Authentication endpoints
│ │ ├── movies.py # Movie data endpoints
│ │ ├── reviews.py # Review CRUD endpoints
│ │ └── sentiment.py # Local keyword-based sentiment analysis
│ ├── requirements.txt # Python dependencies
│ └── Dockerfile # Backend Docker config
├── frontend/ # React Frontend
│ ├── public/ # Static files & favicon
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── LandingPage.js # Welcome page
│ │ │ ├── MainDashboard.js # Main app dashboard
│ │ │ ├── MovieDetail.js # Movie details & reviews
│ │ │ ├── MoviePosterCarousel.js
│ │ │ ├── MyRatings.js # User's reviews page
│ │ │ ├── Login.js # Login form
│ │ │ └── Register.js # Registration form
│ │ ├── contexts/ # React Context API
│ │ │ └── AuthContext.js # Authentication state
│ │ ├── services/ # API service layer
│ │ │ └── api.js # Axios API client
│ │ ├── App.js # Main app with routing
│ │ └── index.js # App entry point
│ ├── package.json # Node.js dependencies and scripts
│ └── Dockerfile # Frontend Docker config
├── .github/workflows/ # GitHub Actions CI/CD
├── create_sample_data.py # Sample data creation script
├── deploy_check.py # Deployment readiness checker
├── docker-compose.yml # Local development setup
├── render.yaml # Render deployment config
├── DEPLOYMENT_GUIDE.md # Complete deployment instructions
├── database_admin_guide.md # Database management guide
├── useful_queries.md # Database query reference
├── env.example # Environment variables template
└── README.md # Project documentation
- Create feature branch
- Implement backend endpoints in
/backend/routers/
- Create database models in
/backend/models/
- Build React components in
/frontend/src/components/
- Update API service layer in
/frontend/src/services/
- Test thoroughly
- Submit pull request
# Start local development
docker-compose up -d
# Access database admin interface
open http://localhost:8080 # Adminer
# Run sample data script
python3 create_sample_data.py
# Check deployment readiness
python3 deploy_check.py
The application is currently deployed using modern cloud services:
- Frontend: Render - React static site hosting (750 hours/month free)
- Backend: Render - FastAPI hosting (750 hours/month free)
- Database: NeonDB - Serverless PostgreSQL
- CI/CD: GitHub Actions for automated deployments
- Follow the comprehensive guide: See
DEPLOYMENT_GUIDE.md
- Check readiness: Run
python3 deploy_check.py
- Deploy in minutes: All services have free tiers!
Variable | Description | Required | Example |
---|---|---|---|
TMDB_API_KEY |
TMDB API access key | Yes | eyJhbGciOiJIUzI1NiJ9... |
GROQ_API_KEY |
Groq AI API key (optional) | No* | gsk_... |
DATABASE_URL |
PostgreSQL connection string | Yes | postgresql://user:pass@host:5432/db |
SECRET_KEY |
JWT signing secret | Yes | your-super-secret-key |
REACT_APP_API_URL |
Backend API URL for frontend | Production | https://your-backend.onrender.com |
- All variables have sensible defaults for local development
- TMDB API key is required; Groq API key is optional (only needed for recommendations)
- *Groq API key: Required only for AI-powered movie recommendations;
- Set environment variables in your hosting service dashboards
- See
DEPLOYMENT_GUIDE.md
for step-by-step instructions
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Follow the existing code structure
- Test locally with Docker before submitting PR
- Update documentation if needed
- Use meaningful commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
The application comes with sample users and reviews for testing:
- Email:
[email protected]
| Password:password123
- Email:
[email protected]
| Password:password123
- Email:
[email protected]
| Password:password123
Create your own sample data: python3 create_sample_data.py
- The Movie Database (TMDB) for comprehensive movie data
- Groq for AI-powered movie recommendations
- FastAPI for the excellent Python web framework
- React for the powerful frontend framework
- TailwindCSS for beautiful utility-first CSS
- Render for reliable full-stack hosting
- NeonDB for serverless PostgreSQL hosting