Clone this repository
git clone git@github.com:patrickchin/haru2-vercel.git
cd haru2-vercelCopy the example env file which contains all the necessary enviroment variables sufficient for most development. For file uploads, email and text sending more variables need to be set.
cp .env.example .env.localInstall the node dependencies
pnpm installStart the database in a local container
docker compose upPush the schemas to your local database using Drizzle ORM
pnpm drizzle-kit pushThen finally, run the development server using
pnpm devOpen http://localhost:3000 with your browser to see the result.
The production server can be built and run using
pnpm build
pnpm startDrizzle makes database changes a lot easier!
- After modifying
drizzle/schema.tsfile the changes are pushed to the database with the following commands:[!CAUTION] Very easy to delete data with this command, drizzle will warn
# to generate sql migration files from the schema changes
pnpm drizzle-kit generate
# to execute the migration files on the databse
pnpm drizzle-kit migrateWe are running on vercel, and using their provided postgres server and blob store.
pnpm playwright install
pnpm playwright testWe currently have very minor playwright testing on Github Actions
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!