- NodeJS (v17.5+)
- yarn
- Prisma CLI
The frontend utilizes NextAuth for authentication. You should update the authentication providers based on your platform requirements.
# To setup
$ yarn install
# Copy .env over
$ cp .env.example .env.local
# If running for production, use .env.production
$ cp .env.example .env.production
💡 Before running the frontend, make sure that the backend is already running!
You should not need to run these commands. See this section for more info. If you are running locally for development, there are a few things to take note of:
- Make sure that your Prisma schema is always in sync with the backend. To do this, run
npm run generate
. - Run the command below to get it started
# Development mode
$ yarn dev -p 3001
You should not need to run these commands. See this section for more info. If you are deploying this application for production, it is slightly easier to setup, but there are still some things to be aware of:
- Make sure you have a
.env.production
setup as it will be used by thedocker-compose.yml
file. - Your
next.config.js
should include the domains & hostnames of where your image files are hosted.
# Production mode
$ yarn build && yarn start
The frontend utilizes NextAuth, which shares a schema dependency with the backend. To ensure that the Prisma schemas are always in sync (locally), you should run npm run generate
in the backend, which will copy the schema here and run Prisma generate. This is only needed for local development. Make sure to commit this to ensure the production setup uses the up to date schema.
The easiest way to deploy this app is to use the Vercel Platform from the creators of Next.js.
Check out the Next.js deployment documentation for more details. However, there is a lot more setup that you will need to do to ensure it works with your backend.