Welcome to Protask, a modern, high-performance task management boilerplate built as a monorepo. It features a robust Go backend (Echo) and a slick React SPA (Vite + Tailwind CSS v4) communicating over type-safe HTTP contracts.
This codebase is managed with Turborepo and package-managed via Bun.
graph TD
subgraph Apps
FE["apps/frontend (React)"]
BE["apps/backend (Go)"]
end
subgraph Packages
OA["packages/openapi (Contracts)"]
ZD["packages/zod (Schemas)"]
EM["packages/emails (React Email)"]
end
FE -->|API client| OA
OA -->|Depends on| ZD
BE -->|Templates| EM
| Directory | Type | Language/Framework | Purpose |
|---|---|---|---|
apps/backend |
Service | Go (Echo v4) | API server, Postgres migrations, Redis task queue, Clerk auth |
apps/frontend |
Client | TS (React, Vite, Tailwind v4) | Single Page Application dashboard & todo manager |
packages/emails |
Package | TypeScript (React Email) | Shared transactional email builder & preview tool |
packages/openapi |
Package | TypeScript (ts-rest) | OpenAPI contract builder linking frontend & backend schemas |
packages/zod |
Package | TypeScript (Zod) | Shared request/response validation schemas |
Before you start, ensure you have the following installed on your machine:
- Bun: Version
^1.2.13(Package manager & task execution) - Go: Version
1.24+(For backend) - PostgreSQL: Version
16+(Backend DB) - Redis: Version
8+(Queue storage for Asynq background tasks) - Task: For managing backend-specific commands (Taskfile.dev)
Run the following at the monorepo root to install node dependencies and build the TypeScript packages:
bun installBoth applications require environment variables:
- Backend:
Copy the backend sample environment file and adjust configuration:
cd apps/backend cp .env.sample .env - Frontend:
Configure the local environment for Vite (e.g. Clerk public key):
cd apps/frontend cp .env.local.sample .env.local # Or create one if sample doesn't exist
Ensure PostgreSQL is running, then run backend migrations using Go Task:
cd apps/backend
task migrations:upTo run frontend, backend, and all dependent packages simultaneously in development mode, run the following in the root folder:
bun devYou can spin up the entire monorepo stack (PostgreSQL, Redis, Go Backend, and React Frontend) fully containerized with a single command.
- Ensure you have the Docker daemon running locally.
To build and launch all services, run the following command at the root of the repository:
VITE_CLERK_PUBLISHABLE_KEY=pk_test_... docker compose up --buildImportant
The VITE_CLERK_PUBLISHABLE_KEY environment variable is required by the frontend build stage. Replace it with your actual Clerk Publishable credentials.
Once the services are active:
- React Frontend:
http://localhost:3000 - Go Backend API:
http://localhost:8080 - Database (PostgreSQL): Port
5432 - Cache (Redis): Port
6379
The database schema migrations run automatically on backend startup. This runs the Turborepo dev runner, starting both the backend service and the frontend Vite server.
The following commands are available from the root of the repository:
bun dev: Runs all applications and package builders in watch mode.bun build: Compiles all packages and builds frontend assets for production.bun lint: Lints frontend and packages.bun lint:fix: Runs ESLint with autorigging across frontend & packages.bun format:check: Checks formatting rules using Prettier.bun format:fix: Automatically formats all Javascript/Typescript files using Prettier.bun typecheck: Runs TypeScript compiler checks on the frontend and packages.bun clean: Clears.turbocaches, compiler build outputs, andnode_modulesfolders.
- Authentication: Clerk is used for secure user sessions.
- APM & Logging: New Relic is integrated in the Go backend along with Zerolog for JSON structured output.
- Transactional Email: Resend handles email dispatching.
For detailed instructions, refer to the respective project READMEs:
- Read the Backend README for database structure and backend architecture.
- Read the Frontend README for UI components and style guidelines.