A sample video library web app.
- Backend: Express/tRPC
- Database: Kysely (with PostgreSQL)
- Frontend: React/Tailwind CSS
- Node.js (>= v23.6.0 due to TypeScript support)
- PostgreSQL (>= v6.0)
- npm globally installed
# Clone the repository
git clone https://github.com/oddlyfunctional/video-library.git
# Navigate into the project directory
cd video-library
# Install dependencies
npm install- Setup your environment variables (the database credentials in particular are necessary):
# Copy the .env template
cp .env.example .env
# Then edit .env
- Prepare the database:
npm run db:dev:prepare
- Run the development servers:
npm run dev
- Setup your environment variables (the database credentials in particular are necessary):
# Copy the .env template
cp .env.example .env.test
# Then edit .env.test
- Prepare the database:
npm run db:test:prepare
- Run the tests:
# Runs tests once:
npm test
# Runs tests and keep watching for changes, ideal for development:
npm run test:dev
- Transpile server code to relax Node.js version requirements
- Consider doing Server-Side Rendering
- Setup react-router to Framework mode for type-safe routes and improve code-splitting (consider changing to
@tanstack/react-router) - Evaluate and improve A11y
- Better handle loading states (prettier UI, define minimum time for showing spinner)
- Standardize folder structure
- Write integration and e2e tests
- Verify performance for video list on large datasets (perhaps add pagination and/or virtualization)
- Setup production build (right now there's no easy way to serve the static assets once built)
- Write
Dockerfilefor easy deployment