Bingewatcher is a platform for finding movies. Users can search for movies, filter them by category, sort them by title or rating, add them to a watchlist and rate them. Personal ratings are stored per user, and each movie shows the average rating across all users.
The project is live at:
Note: The server sleeps when idle. If no movies show up, refresh the page after about a minute 🚀
Full Name |
|
|---|---|
| Magnus Tomter Ouren | magnutou@stud.ntnu.no |
| Ole Remi Dahl | olerd@stud.ntnu.no |
| Jakob Relling | jakobere@stud.ntnu.no |
| Magnus Byrkjeland | magnueb@stud.ntnu.no |
| Part | Technologies |
|---|---|
| Client | React 19, TypeScript 7, Vite, MUI, Apollo Client, React Router, SCSS modules |
| Server | Bun, Apollo Server, GraphQL, Mongoose, MongoDB |
| Testing | Vitest and Testing Library (client), bun test (server), Playwright (e2e) |
| Tooling | Bun workspaces, Oxlint, Stylelint, Prettier, GitHub Actions |
| Hosting | Vercel (client), Render (server) |
The repository is a Bun workspace with two packages:
The root holds the shared tooling (TypeScript, Oxlint, Stylelint, Prettier) and scripts that run across both packages. More documentation is in the docs folder.
- Bun 1.4 or newer. The exact version is pinned in
packageManagerin package.json. - A MongoDB connection string to run the server against real data. The tests don't need one.
Install Bun with:
curl -fsSL https://bun.sh/install | bash-
Install the dependencies for every workspace:
bun install
-
Create
server/.envwith the database URI:URI=<mongodb-test-uri>
-
Create
client/.envpointing the client at the local server:VITE_SERVER_URI=http://localhost:4000
-
Start the client and server:
bun run dev
The client runs at http://localhost:5173 and the server at http://localhost:4000. Both reload on code changes.
To start only one of them, use bun run dev:client or bun run dev:server.
Run these from the repository root. Each workspace also has its own scripts, described in the client and server READMEs.
Command |
Description |
|---|---|
bun install |
Installs the dependencies for every workspace. |
bun run dev |
Starts the client and server in watch mode. |
bun run dev:client |
Starts the client in watch mode. |
bun run dev:server |
Starts the server in watch mode. |
bun run build |
Type-checks and builds the client into client/dist. |
bun run check |
Runs lint, style lint, format check, typecheck and all tests. It's the same set of checks as CI, except the end-to-end tests. |
Command |
Description |
|---|---|
bun run test |
Runs the client unit tests and the server tests. |
bun run test:unit |
Runs the client unit tests with Vitest. |
bun run test:server |
Runs the server tests with bun test against an in-memory MongoDB. |
bun run test:e2e |
Runs the Playwright tests in Chromium and Firefox. See End-to-end tests. |
bun run coverage |
Runs the client unit tests with coverage. The report is written to client/coverage. |
Command |
Description |
|---|---|
bun run lint |
Lints JavaScript and TypeScript with Oxlint, including type-aware rules. |
bun run lint:style |
Lints the SCSS modules with Stylelint. |
bun run lint:fix |
Applies the automatic fixes from Oxlint and Stylelint. |
bun run format |
Formats the repository with Prettier. |
bun run format:check |
Checks the formatting without changing files. |
bun run typecheck |
Type-checks the client and its config files with TypeScript 7. |
The repository recommends VS Code extensions for Oxc, Prettier and Stylelint, and fixes lint issues on save.
The Playwright tests run against an in-memory MongoDB seeded with a small set of movies, so they need no database access. Before the first run, install the browsers:
cd client
bunx playwright install chromium firefoxThen run:
bun run test:e2ePlaywright starts its own client and server on separate ports. Tests tagged @test-db expect the movies in the shared test database and are skipped. See docs/playwright.md for how to run them.
GitHub Actions runs on every pull request and on pushes to main. Lint and typecheck, client unit tests, server tests and end-to-end tests run as parallel jobs. There is no build job, since Vercel and Render build on deploy. See docs/ci.md.
- Client: Vercel builds and deploys
clientfrommain. SetVITE_SERVER_URIto the server URL in the Vercel project. - Server: Render runs
serverwith Bun. Set theURIenvironment variable to the production database URI.
See docs/deployment.md for the build settings.
