A website uptime monitoring platform built with Turborepo, Next.js, Express, Prisma, and Redis streams. Monitor your websites, APIs, and endpoints with real-time status checks, alerts, and dashboards.
- Node.js >=18
- Bun (recommended package manager)
- Docker & Docker Compose (for containerized setup)
- PostgreSQL and Redis (for local development, or use Docker)
-
Clone the repository:
git clone https://github.com/your-org/up-site-ts.git cd up-site-ts -
Create a
.envfile in the root directory with all required environment variables. Example:DATABASE_URL=postgresql://postgres:yourpassword@localhost:5432/upsite JWT_SECRET=your-secret-key REDIS_URL=redis://localhost:6379 NEXT_PUBLIC_API_URL=http://localhost:8000 POSTGRES_PASSWORD=yourpassword # All 4 can be anything for local deployment purpose WORKER_ID=your-worker-id ALERT_WORKER_ID=your-alert-worker-id RESEND_API=your-resend-api-key FROM_MAIL=your-email@example.com
-
Set up the database:
- Ensure PostgreSQL and Redis are running locally, or start them with Docker:
docker run -d --name postgres -e POSTGRES_PASSWORD=yourpassword -e POSTGRES_DB=upsite -p 5432:5432 postgres:16 docker run -d --name redis -p 6379:6379 redis:7
- Run Prisma migrations:
cd packages/db npx prisma migrate dev cd ../..
- Ensure PostgreSQL and Redis are running locally, or start them with Docker:
-
Install dependencies:
bun install
-
Start development servers:
bun run dev
This will start all apps and packages in development mode.
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
-
Ensure Docker and Docker Compose are installed and running.
-
Create a
.envfile in the root directory with all required environment variables. For Docker setup, use service names for database and Redis:DATABASE_URL=postgresql://postgres:yourpassword@localhost:5432/upsite JWT_SECRET=your-secret-key REDIS_URL=redis://localhost:6379 NEXT_PUBLIC_API_URL=http://localhost:8000 POSTGRES_PASSWORD=yourpassword # All 4 can be anything for local deployment purpose WORKER_ID=your-worker-id ALERT_WORKER_ID=your-alert-worker-id RESEND_API=your-resend-api-key FROM_MAIL=your-email@example.com
-
Build and start the stack:
bun docker
Or manually:
docker compose build docker compose up -d
-
Service startup order:
- Infrastructure (postgres, redis)
- Migrator (runs Prisma migrations)
- Backend services (server, producer, consumer, notifier, alert-worker)
- Frontend (web)
-
Access services:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- PostgreSQL: localhost:5432
- Redis: localhost:6379
-
View logs:
docker compose logs -f
-
Stop services:
docker compose down
For advanced Docker usage, troubleshooting, and production deployment tips, see docker/README.md.
This Turborepo monorepo includes the following apps and packages:
web: Next.js frontend with dashboard and authenticationserver: Express.js backend API with user management and website monitoringproducer: Redis stream producer for uptime checksconsumer: Redis stream consumer for processing checksnotifier: Email notification service using Resendalert-worker: Alert processing and notification workertests: Test suite for the application
db: Prisma database client and schemaredis-streams: Redis streams utilitiesui: Shared React UI componentseslint-config: ESLint configurationstypescript-config: TypeScript configurations
Each package/app is 100% TypeScript.
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
Run the test suite:
cd apps/tests
bun run testbun run buildbun run lintbun run check-typesbun run formatTurborepo supports remote caching with Vercel. To enable:
turbo login
turbo link