Skip to content

patrickchin/haru2-vercel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streamlined Construction Management

Getting Started

Dependencies

Development

Clone this repository

git clone git@github.com:patrickchin/haru2-vercel.git
cd haru2-vercel

Copy 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.local

Install the node dependencies

pnpm install

Start the database in a local container

docker compose up

Push the schemas to your local database using Drizzle ORM

pnpm drizzle-kit push

Then finally, run the development server using

pnpm dev

Open http://localhost:3000 with your browser to see the result.

The production server can be built and run using

pnpm build
pnpm start

Database Development Workflow

Drizzle makes database changes a lot easier!

  • After modifying drizzle/schema.ts file 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 migrate

The Deployment

We are running on vercel, and using their provided postgres server and blob store.

Testing

pnpm playwright install
pnpm playwright test

We currently have very minor playwright testing on Github Actions

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Releases

No releases published

Packages

No packages published

Languages