This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Follow these steps to get the project up and running on your machine.
- Node.js v18+ and npm (or Yarn/pnpm). Confirm with
node -vandnpm -v. - (Optional) Supabase account or Supabase CLI if you want to run a local Postgres instance.
# clone the repo
git clone <repo-url> dayos-v1
cd dayos-v1
# install dependencies
npm installThis project reads config from Vite env vars prefixed with VITE_.
Create a local env file .env.local (do NOT commit it) and add:
VITE_SUPABASE_URL=<your-supabase-url>
VITE_SUPABASE_ANON_KEY=<your-supabase-anon-key>
VITE_GOOGLE_CLIENT_ID=<your-google-oauth-client-id>Notes:
- Example values already exist in
.envfor development, but you should replace them with your own keys for production or private development. - Keep secrets out of source control (add
.env.localto.gitignore).
This project uses Supabase (Postgres). To initialize the DB schema:
- Create a Supabase project (https://app.supabase.com/).
- Open the SQL Editor in the Supabase dashboard and run the SQL files in the
database/folder in order:database/schema.sqldatabase/calendar_accounts_migration.sqldatabase/focus_sessions_migration.sql
Alternatively, if you use psql or the Supabase CLI, run:
psql "postgresql://<user>:<pass>@<host>:<port>/<db>" -f database/schema.sql
# then run the other migration files- In the Google Cloud Console, create OAuth 2.0 credentials (OAuth Client ID).
- Set the Authorized JavaScript origins to
http://localhost:5173(Vite default) and add any production domains. - Copy the client ID into
VITE_GOOGLE_CLIENT_ID.
npm run dev
# open: http://localhost:5173# build for production
npm run build
# preview the production build locally
npm run previewnpm run lint- If the app shows authentication or DB errors, verify
VITE_SUPABASE_*env vars are correct and the SQL schema was applied. - If Google login fails, double-check the OAuth client setup and authorized origins.
- Dev server default port is
5173. If already in use, Vite will prompt to use another.
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.