Keep track of your series and seen episodes.
The series are automatically imported from The Movie Database (TMDB).
The goal of the tech stack is to be as fully statically typed as possible, all
the way from the database to the front-end, while being as simple as possible.
pnpm and nx are used to manage the
multiple workspaces.
The front-end is an SPA with server-side rendering:
- React
- Vite,
vite-plugin-ssr - Apollo Client
- Radix UI
- Vanilla Extract
- React Hook Form
- GraphQL Code Generator
- Vitest, React Testing Library
The back-end is a GraphQL API with full type safety:
And of course, all code is checked with:
Finally, the project is continuously deployed to a DigitalOcean droplet with the help of:
- Node.js
pnpm- See the required versions in
package.json,enginesfield
git clone https://github.com/JoosepAlviste/serieslist.git
pnpm install
./bin/generate-secret-token.shNext, generate a new TMDB API token
and add it into the .env file. Make sure to check the rest of the
.env file for any other variables that should be updated.
First, run the Redis and database containers and migrate the database:
docker-compose up -d
pnpm migrate
# Migrate the test database
pnpm migrate:testThen, run the application (both the API and the web application):
pnpm startFor more specific information about the webapp and the API, check out their respective READMEs.
The development server is accessible at http://localhost:3000.
Both the API and the webapp follow a similar file structure where the folders
are split into features. The src folders contain some general, "global" files,
while the src/features folders contain feature-specific code.
These are the types of packages in the packages folder:
core-: Packages that provide reusable logic to be used in all other packagesfeature-: Packages containing business logicutil-: Utilities and pure functions that don't usually have any framework-specific code
A new package can be generated with:
pnpm generate:packageThe project is deployed to a DigitalOcean droplet and is continuously deployed
with GitHub Actions whenever anything is merged to master.
In production, the API and the webapp are run inside Docker like so:
docker-compose -f docker-compose.production.yml upNeon is used as a managed PostgreSQL service.
The pipeline builds Docker images, pushes them to the GitHub registry, SSH-es into the server, and pulls the images.
Error monitoring in Sentry requires setting up a few environment variables:
API_SENTRY_DSN: The API project DSNVITE_APP_SENTRY_DSN: The webapp project DSNSENTRY_ORGSENTRY_PROJECTSENTRY_AUTH_TOKEN: Generate from https://sentry.io/settings/account/api/auth-tokens/, requires theproject:releasesandorg:readscopes
There are some end-to-end tests, but they are still a work in progress.
First, migrate the test database:
pnpm migrate:testThen, run the e2e tests:
# Install the playwright dependencies if they haven't been yet
(cd apps/e2e && pnpm dlx playwright install chromium --with-deps)
pnpm test:e2e