A movie, TV show and anime discovery app with user accounts, comments and a personal Watch Later list.
Live site: https://akansh-gupta.github.io/Couch-Critic/
- Browse trending, premiering, airing today and upcoming titles for Movies, TV Shows and Anime
- Search each category and filter by genre
- Detail pages with trailer, ratings, cast info, related titles and recommendations
- Login with Auth0 (email/password or Google)
- Profile page with an editable username
- Comments on every title (add, edit, delete)
- Watch Later list saved per account
- Responsive layout for desktop and mobile
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite 7, React Router 6, Bootstrap 5, react-slick |
| Auth | Auth0 (@auth0/auth0-react, express-oauth2-jwt-bearer) |
| Backend | Node.js, Express 5 |
| Database | MongoDB Atlas |
| Data source | Simkl API |
| Hosting | GitHub Pages (frontend), Render (backend) |
Couch-Critic/
├── backend/
│ ├── mongodb.js # MongoDB connection
│ ├── server.js # Express API
│ └── package.json
├── public/
│ └── 404.html # SPA redirect for GitHub Pages
├── src/
│ ├── api.js # Backend base URL
│ ├── components/ # Pages and UI components
│ ├── style/ # CSS files
│ ├── App.jsx # Routes
│ └── main.jsx # Auth0 provider and app entry
├── index.html
├── vite.config.mjs
└── package.json
- Node.js 22 LTS (Vite 7 requires 20.19+ or 22.12+)
- A MongoDB Atlas cluster
- An Auth0 application and API
- A Simkl API client ID
git clone https://github.com/Akansh-Gupta/Couch-Critic.git
cd Couch-Critic
npm install
cd backend
npm install
cd ..Create .env.local in the project root:
VITE_AUTH0_DOMAIN=your-tenant.us.auth0.com
VITE_AUTH0_CLIENT_ID=your_auth0_client_id
VITE_SIMKL_CLIENT_ID_1=your_simkl_client_idVITE_API_URL is optional. Without it the frontend uses http://localhost:4000.
Create backend/.env:
MONGO_URL=your_mongodb_atlas_connection_stringnpm run devThis starts the frontend (Vite) and the backend (nodemon on port 4000) together. Open the URL printed by Vite, which includes the /Couch-Critic/ base path.
| Command | Description |
|---|---|
npm run dev |
Run frontend and backend together |
npm start |
Run the frontend only |
npm run build |
Build the frontend into dist |
npm run preview |
Preview the production build |
npm run deploy |
Build and publish dist to the gh-pages branch |
Routes marked with a lock require an Auth0 access token in the Authorization: Bearer header.
| Method | Route | Auth | Description |
|---|---|---|---|
| GET | / |
Health check | |
| GET | /protected |
🔒 | Sync the logged-in user to MongoDB |
| GET | /users/me |
🔒 | Get the current user's profile |
| PATCH | /users/me |
🔒 | Update the username |
| GET | /watchlater |
🔒 | Get the user's Watch Later list |
| POST | /watchlater |
🔒 | Add a title |
| DELETE | /watchlater/:simklId |
🔒 | Remove a title |
| GET | /comments/:type/:id |
Get comments for a title | |
| POST | /comments |
🔒 | Add a comment |
| PATCH | /comments/:id |
🔒 | Edit a comment |
| DELETE | /comments/:id |
🔒 | Delete a comment |
- Create a new Web Service from this repo.
- Set Root Directory to
backend, Build Command tonpm install, and Start Command tonode server.js. - Add environment variables:
MONGO_URLandNODE_VERSION=22. - In MongoDB Atlas, allow Render's access under Network Access (
0.0.0.0/0on the free tier). - Add your frontend origin to the
corslist inbackend/server.js.
The free tier sleeps after inactivity, so the first request can take up to a minute.
-
Create
.env.productionin the project root (do not commit it):VITE_API_URL=https://your-backend.onrender.com VITE_AUTH0_DOMAIN=your-tenant.us.auth0.com VITE_AUTH0_CLIENT_ID=your_auth0_client_id VITE_SIMKL_CLIENT_ID_1=your_simkl_client_id
-
Run:
npm run deploy
-
In the repo, go to Settings → Pages and set the source to the
gh-pagesbranch,/ (root).
Vite reads VITE_* variables at build time, so rebuild and redeploy after changing them.
In your Auth0 application settings, add:
- Allowed Callback URLs:
https://akansh-gupta.github.io/Couch-Critic/callback,http://localhost:5173/Couch-Critic/callback - Allowed Logout URLs:
https://akansh-gupta.github.io/Couch-Critic/movie,http://localhost:5173/Couch-Critic/movie - Allowed Web Origins and Allowed Origins (CORS):
https://akansh-gupta.github.io,http://localhost:5173
For production, replace Auth0's development keys for the Google connection with your own Google OAuth client ID and secret.
- Routing uses the
/Couch-Critic/base path.public/404.htmland the script inindex.htmlredirect deep links on GitHub Pages. - Watch Later items are stored in the
watchlatercollection, keyed by the Auth0 user ID, so each account has its own list. - The Simkl client ID is embedded in the frontend bundle, as with any client-side API key.
This project is for learning and personal use.