As a developer, I want a monorepo scaffold using Yarn workspaces so that the project can contain a React frontend in /web using Vite and React 19, and a Django API in /api backed by a PostgreSQL database, with Docker Compose for development.
Acceptance Criteria
Root directory contains a package.json with workspaces field listing "web" and "api".
/web folder exists with a complete Vite project structure:
package.json with react version 19 and vite dependencies.
src/ directory with entry point (main.jsx or index.jsx), basic React component.
vite.config.js configured for development.
/api folder exists with a Django project scaffold:
use uv to manage dependencies and the environment.
manage.py present.
project/ directory with Django settings, including a settings.py that configures PostgreSQL (DATABASES with ENGINE = 'django.db.backends.postgres', NAME, USER, PASSWORD, HOST, PORT).
Minimal installed apps list (e.g., ['django.contrib.contenttypes', 'django.contrib.auth']).
Docker Compose file (docker-compose.yml) at repository root defines services:
db: PostgreSQL image (postgres:15), with volume for data persistence, environment variable POSTGRES_DB set to default database name.
web: Build context ./web, exposes port 3000, environment variable REACT_APP_API_URL set appropriately, depends_on db with condition service_healthy.
api: Build context ./api, exposes port 8000, environment variable DATABASE_URL pointing to db:5432, command to run migrations before startup (python manage.py migrate && python manage.py runserver 0.0.0.0:8000), depends_on db with health check.
Health check for db service that waits until PostgreSQL accepts connections.
Volumes are mounted for both web and api services for live development.
The compose setup can be started with docker compose up and both services become reachable on localhost.
No testing framework or CI/CD pipelines are required per clarification.
Environment variables are limited to those needed for DB connection (DATABASE_URL) and any API URLs; no additional env vars unless required.
## User Story
As a developer, I want a monorepo scaffold using Yarn workspaces so that the project can contain a React frontend in `/web` using Vite and React 19, and a Django API in `/api` backed by a PostgreSQL database, with Docker Compose for development.
## Acceptance Criteria
- Root directory contains a `package.json` with `workspaces` field listing "web" and "api".
- `/web` folder exists with a complete Vite project structure:
- `package.json` with `react` version 19 and `vite` dependencies.
- `src/` directory with entry point (`main.jsx` or `index.jsx`), basic React component.
- `vite.config.js` configured for development.
- `/api` folder exists with a Django project scaffold:
- use `uv` to manage dependencies and the environment.
- `manage.py` present.
- `project/` directory with Django settings, including a `settings.py` that configures PostgreSQL (`DATABASES` with `ENGINE` = 'django.db.backends.postgres', `NAME`, `USER`, `PASSWORD`, `HOST`, `PORT`).
- Minimal installed apps list (e.g., ['django.contrib.contenttypes', 'django.contrib.auth']).
- Docker Compose file (`docker-compose.yml`) at repository root defines services:
- `db`: PostgreSQL image (`postgres:15`), with volume for data persistence, environment variable `POSTGRES_DB` set to default database name.
- `web`: Build context `./web`, exposes port 3000, environment variable `REACT_APP_API_URL` set appropriately, depends_on `db` with condition `service_healthy`.
- `api`: Build context `./api`, exposes port 8000, environment variable `DATABASE_URL` pointing to `db:5432`, command to run migrations before startup (`python manage.py migrate && python manage.py runserver 0.0.0.0:8000`), depends_on `db` with health check.
- Health check for `db` service that waits until PostgreSQL accepts connections.
- Volumes are mounted for both `web` and `api` services for live development.
- The compose setup can be started with `docker compose up` and both services become reachable on localhost.
- No testing framework or CI/CD pipelines are required per clarification.
- Environment variables are limited to those needed for DB connection (`DATABASE_URL`) and any API URLs; no additional env vars unless required.
marko
added this to the (deleted) project 2026-05-24 05:24:24 +00:00
marko
changed title from Vite React 19 Project scaffold to monorepo scaffold with /web and /api folders2026-05-24 05:28:27 +00:00
marko
changed title from monorepo scaffold with /web and /api folders to Set up monorepo scaffold with Yarn workspaces for Web and API2026-05-24 05:57:24 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
User Story
As a developer, I want a monorepo scaffold using Yarn workspaces so that the project can contain a React frontend in
/webusing Vite and React 19, and a Django API in/apibacked by a PostgreSQL database, with Docker Compose for development.Acceptance Criteria
package.jsonwithworkspacesfield listing "web" and "api"./webfolder exists with a complete Vite project structure:package.jsonwithreactversion 19 andvitedependencies.src/directory with entry point (main.jsxorindex.jsx), basic React component.vite.config.jsconfigured for development./apifolder exists with a Django project scaffold:uvto manage dependencies and the environment.manage.pypresent.project/directory with Django settings, including asettings.pythat configures PostgreSQL (DATABASESwithENGINE= 'django.db.backends.postgres',NAME,USER,PASSWORD,HOST,PORT).docker-compose.yml) at repository root defines services:db: PostgreSQL image (postgres:15), with volume for data persistence, environment variablePOSTGRES_DBset to default database name.web: Build context./web, exposes port 3000, environment variableREACT_APP_API_URLset appropriately, depends_ondbwith conditionservice_healthy.api: Build context./api, exposes port 8000, environment variableDATABASE_URLpointing todb:5432, command to run migrations before startup (python manage.py migrate && python manage.py runserver 0.0.0.0:8000), depends_ondbwith health check.dbservice that waits until PostgreSQL accepts connections.webandapiservices for live development.docker compose upand both services become reachable on localhost.DATABASE_URL) and any API URLs; no additional env vars unless required.Vite React 19 Project scaffoldto monorepo scaffold with /web and /api foldersmonorepo scaffold with /web and /api foldersto Set up monorepo scaffold with Yarn workspaces for Web and APImarko referenced this issue2026-05-24 07:16:36 +00:00
Closing — monorepo scaffold setup is already implemented on main. Related PR #11 was closed as superseded.
— Reid (Hermes Reviewer)