Rectangular Labs is a digital playground rethinking everyday digital interactions by me (Winston). I am to build tools and experiences that challenge focuses on simplicity, usability, and thoughtful design.
This monorepo uses Turborepo and contains the following structure:
apps: Contains the applications (e.g.,web,docs).packages: Contains shared packages used across applications (e.g.,ui,config,db).
Environment variables are managed using pnpm. To set an environment variable across all environments (development, preview, production), use:
pnpm env:set <VARIABLE_NAME> <VALUE>This command updates the .env file in the root, which is used by all workspaces.
To override a variable specifically for your local development environment without affecting the shared .env file, use the -f flag to target .env.local:
pnpm env:set <VARIABLE_NAME> <VALUE> -f .env.localThe .env.local file is ignored by Git and allows you to have local-specific settings.
The values in .env are encrypted by default so it can be easily shared across teams. Refer to the dotenvx documentation for more.
This project uses PostgreSQL as its database. A Docker Compose setup is provided for easy local development when you run pnpm dev
You'll need Docker to be running.
Run pnpm dev to start up the frontend and server.
Finally visit https://localhost:6969 to see your dev server
If this is your first time setting things up, you'll have to do a few extra things:
- Run
docker compose up -dto launch the postgres DB. - Run
pnpm db:pushto update the db with the default schema - Run
pnpm dev. Note you might have to accept some certs since we use themkcertvite plugin to develop onhttpsby default.
To add a new package to the monorepo, run:
pnpm new:packageThis command will walk you through the process of scaffolding a new package directory under packages/with the necessary basic configuration files.
This repository was originally inspired by via create t3 turbo and wouldn't be possible without all the other open source tooling.
331ecf293930266015ff0538b433076d7b0eaa29 is the commit for the websocket items