A study focused YSWS
- Clone the repo (yeah obviously)
git clone https://github.com/vividsystem/jusstudy.git- Install dependencies
# Install dependencies for all workspaces
bun install- Set up environment variables
Set up .env for the client
nano client/.envAnd paste the following into the file:
VITE_CLIENT_URL=http://localhost:5173
VITE_SERVER_URL=http://localhost:3000
Set up .env for the server
nano server/.envAnd paste the following into the file:
CORS_ORIGIN=http://localhost:5173
DATABASE_URL=your_database_url
BETTER_AUTH_SECRET=your_secret
HACKCLUB_AUTH_CLIENT_ID=your_client_id
HACKCLUB_AUTH_CLIENT_SECRET=your_client_secret
HACKATIME_API_KEY=your_api_key# Run all workspaces in development mode with Turbo
bun run dev
# Or run individual workspaces directly
bun run dev:client # Run the Vite dev server for React
bun run dev:server # Run the Hono backend
# Lint all workspaces
bun run lint
# Type check all workspaces
bun run type-check
# Run tests across all workspaces
bun run test# Build all workspaces with Turbo
bun run build
# Or build individual workspaces directly
bun run build:client # Build the React frontend
bun run build:server # Build the Hono backend- Do this
openssl rand -base64 32 | bunx wrangler secret put BETTER_AUTH_SECRET
bunx wrangler secret put HACKCLUB_AUTH_CLIENT_ID
bunx wrangler secret put HACKCLUB_AUTH_CLIENT_SECRET
bunx wrangler secret put DATABASE_URL
bunx wrangler secret put HACKATIME_API_KEY
- Add env variables to wrangler.jsonc
NOTE: enviromental loading doesnt work correctly yet as environmental variables passed to the frontend via vite get bundled at compile time so cloudflare variables dont have any effect
This is built upon the bhvr stack. It intern is built upon bun, hono, vite and react. Everything is written in typescript. The project also uses drizzle as an orm and better-auth together with hackclub-auth to provide auth.
To see how this project is licensed see LICENSE.