A full stack restaurant review application built using modern web practices.
- Ability to login and register as an user or restaurant owner
- Restaurant Owners can create restaurants and reply to reviews
- Users can view restaurants and its reviews, and can leave review to a restaurant
- Admins can edit/delete users, restaurants and reviews
- Postgres
- Node 14>
- Yarn 1.x
Before anything, be sure to install all dependencies by running yarn install
in the root of the project.
A local .env
file is needed to configure the application. Clone the existing .env.example
file and rename it to .env
. Once that is done, modify the existing environment variables values to configure the application.
Run a local postgres database
You can get Docker and run a database locally by running the command docker-compose up
in the root of the directory.
This command will start up a postgres database in the local port 5432
using the credentials given on database.env
file.
Migrate and seed the database
First run yarn db:deploy
. Once that is complete, you can run yarn db:seed
to seed your database.
These commands will run the migrations on your database and create a initial admin account.
Run in development mode
Simple running yarn dev
will start up both client and server application.
Build and deploy for production
yarn build
will build both client and server.
This build command will produce an application bundle for the client in the folder dist
inside client directory. These files can be served over a static hosting service.
To run the server application, yarn start
will start in production mode after a build.
start
Start the production built API server. Requires build first
build
Build both client and server
docs
Start a documentation app for the API on port 9999
serve
Start a local server to serve the static assets generated from the client build
dev
Run both client and server locally, watching changes and reloading
test
Run all test suites
db:seed
Seed your database
db:reset
Reset your database and reapply migrations
db:db
Compare your schema with the database and create migrations based on changes
db:deploy
Deploy your migrations
db:generate
Generate Prisma typings
db:studio
Initiate Prisma Studio
- Vite
- React
- Chakra UI
- React Query
- Prisma
- Postgres
- NodeJS