A modern full-stack application built with Remix, NestJS, PostgreSQL, and Turborepo.
git clone git@github.com:wfelliss/SDSD.git
cd SDSDbun install# Start PostgreSQL with Docker Compose
docker-compose up -d
# Or run PostgreSQL directly
docker run --name postgres-dev \
-e POSTGRES_DB=nestjs_app \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=password \
-p 5432:5432 \
-d postgres:15
# To stop the database later:
docker-compose down
# Or: docker stop postgres-dev && docker rm postgres-dev- You will need to request the S3 bucket details from Will Ellis, email him on wellis3@sheffield.ac.uk, Without these the website will not work
# Copy environment file
cp apps/backend/.env.example apps/backend/.env
# Fill this environment file with the contents recieved by Will E
# Generate and run database migrations
cd apps/backend
bun run db:generate
bun run db:migrate
# Optional: Seed database with test data
bun run seed
cd ../..# Start both frontend and backend
bun run dev
# Or start individually:
# bun run dev --filter=frontend # Frontend only
# bun run dev --filter=backend # Backend only- Frontend: http://localhost:3000
- Backend API: http://localhost:3001/api
- Database: PostgreSQL on port 5432
This Turborepo includes the following apps and packages:
frontend: Remix app with Tailwind CSSbackend: NestJS API with Drizzle ORM
@repo/ui: Shared React component library@repo/eslint-config: ESLint configurations@repo/typescript-config: TypeScript configurations
- Frontend: Remix + React 19 + Tailwind CSS
- Backend: NestJS + TypeScript
- Database: PostgreSQL + Drizzle ORM
- Monorepo: Turborepo
- Package Manager: Bun
- Styling: Tailwind CSS with design system
- Dev Tools: TypeScript, ESLint, Prettier
GET /api- Hello from backendGET /api/health- Service health status
GET /api/users- Get all usersGET /api/users/:id- Get user by IDPOST /api/users- Create new userPUT /api/users/:id- Update userDELETE /api/users/:id- Delete user
# Development
bun run dev # Start all apps
bun run dev --filter=frontend # Frontend only
bun run dev --filter=backend # Backend only
# Building
bun run build # Build all apps
bun run build --filter=frontend
bun run build --filter=backend
# Database
cd apps/backend
bun run db:generate # Generate migrations
bun run db:migrate # Run migrations
bun run db:studio # Open Drizzle Studio
bun run seed # Seed test data
# Linting & Type Checking
bun run lint # Lint all packages
bun run check-types # Type check all packagesapps/
βββ frontend/ # Remix frontend
β βββ app/
β β βββ components/
β β β βββ graphs/ # Graph components
β β β βββ base/ # Reusable D3 primitives (LinePlot, Histogram)
β β β βββ domain/ # Domain charts (Displacement, Sag, Travel) using base components
β β βββ lib/ # Telemetry data utilities
β β βββ routes/ # Remix routes (_index.tsx)
β β βββ root.tsx # Root component
β β βββ tailwind.css # Tailwind styles
β βββ public/ # Static assets
β βββ vite.config.ts # Vite config with API proxy
|
βββ backend/ # NestJS backend
β βββ src/
β β βββ database/ # Database schema & connection
β β βββ users/ # Users module
β β βββ main.ts # Application entry
β βββ drizzle/ # Generated migrations
β βββ drizzle.config.ts # Drizzle configuration
β
packages/
βββ ui/ # Shared React components
βββ eslint-config/ # ESLint configurations
βββ typescript-config/ # TypeScript configurations
The project includes Docker Compose for PostgreSQL:
# Start PostgreSQL
docker-compose up -d
# Stop PostgreSQL
docker-compose down
# View logs
docker-compose logs postgresBackend (.env in apps/backend/):
DATABASE_URL=postgresql://postgres:password@localhost:5432/nestjs_app
PORT=3002
NODE_ENV=developmentThe frontend automatically proxies /api/* requests to the backend server. This is configured in apps/frontend/vite.config.ts.
- Deploy to Vercel, Netlify, or any Node.js hosting
- Supports server-side rendering and static generation
- Deploy to Railway, Render, or any Node.js hosting
- Requires PostgreSQL database (use managed services like Supabase or Neon)
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Remix Documentation
- NestJS Documentation
- Drizzle ORM Documentation
- Turborepo Documentation
- Tailwind CSS Documentation
This project is open source and available under the MIT License.