Code of web app for learning Russian language. It's now hardcoded to our own grammar dataset + Supabase auth, but if there will be potential it's possible to make it more agile.
Vite substitutes import.meta.env... env variables at build time.
Meanwhile you can use process.env... to access env variables passed in runtime.
- Bun (package manager and runtime)
- Docker (for local Supabase and PostgreSQL)
- Supabase CLI (for managing local development database)
-
Clone the repository and install dependencies
git clone https://github.com/SillyCoon/grumma.git cd grumma bun install -
Set up local Supabase and database
Start the local Supabase stack (includes PostgreSQL, Auth, and other services):
bunx supabase start
This will start services and output connection URLs.
-
Create
.envfileCreate a
.envfile in the project root with the following variables:DATABASE_URL=<DB URL from supabase start output> SUPABASE_URL=http://127.0.0.1:54321 SUPABASE_KEY=<anon key from supabase start output>
The
SUPABASE_URLandSUPABASE_KEYare needed for Supabase client authentication and are provided by thesupabase startcommand. -
Apply migration and seed the database
bun migrate bun seed
-
Start the development server
bun run dev
The app will be available at
http://localhost:4321
bun run dev- Start the development serverbun run build- Build the project for productionbun run preview- Preview the production build locallybun run type-check- Run TypeScript type checking withastro checkbun run check- Run formatting and linting with Biomebun run test- Run unit tests with Vitestbun run test:integration- Run integration testsbun run migrate- Run database migrations and seed with mock databun run seed- Seed the database with mock data (run separately if needed)
- The project is a monorepo using Bun workspaces. Packages are located in
packages/andlibs/directories. - Local environment variables can be set in
.env - Supabase authentication is configured in
supabase/config.tomlfor local development - Database schema and migrations are managed with Drizzle ORM in
drizzle/andlibs/db/ - Mock seed data is defined in
libs/db/seed.tsusing Drizzle ORM (10 grammar points, 40 exercises) and storage files insupabase/storage/explanations/