-
Framework: Nextjs - app router
-
Styling
- vanilla css and sass (without css/sass modules)
- styled components: mantine
- icons: react-icons
-
Data backend
- Prisma ORM
- Database:
postgresql
(can be configured with.env*
) - Data access and control layer
- Admin template
-
File uploads: Vercel blob
-
Auth: Authjs
- providers (github, google, ...) can be configured
- encryption/session management: jose
- Authorization: simple role based checks
-
Emails: nodemailer
-
Testing
-
Forms
- client and server actions
- validation (client and server): using valibot
Sample environment files provided below and in git repo.
Refer to below links for more details.
-
Database: Prisma database setup configuration
-
File uploads:
- env variable
UPLOAD_METHOD
decides where to upload files- options
local
: localpublic
folder is usedvercel-blob
: Vercel blob store key is needed
- options
- env variable
-
Emails: Gmail account details for verification emails.
- provided in
/env_samples/
directory
npm install
- Note: with
package-lock.json
,npm install
should work fine. Without it there might be issue while installing cypress. - Solution: If you are installing latest versions without
package-lock.json
then- install
cypress
first:npm install cypress@latest --save-dev --ignore-scripts
- then
npm i
as usual
- install
- Check prisma configuration
- Check npm scripts in
package.json
based on workflow choices - Generate initial migrations.
npm run dev:db:migrate
Refer to package.json
for npm scripts to run for dev, test and production. e.g.
npm run dev
Refer to package.json
for npm scripts to run tests. Currently e2e tests are setup to run auth and admin user flows.
npm run test
Then in separate terminal
npm run test:cypress:e2e
<project root>
cypress
: testssrc
: all code related to serverapp
: app router with layouts and pagesdatabase
: prisma/database setupmodels
: table schema definitionsutils
: server functions for prisma/db managementschema.prisma
: main prisma setup
lib
: supporting logic for the appcomponents
: ui generic react componentsdataModels
: for each db model/table- data access control
- ui: form fields, crud forms
- definitions: validation schemas, types for typescript
features
: app feature specific ui components, actions, definitionsutils
: miscellaneous helper functions, e.g. mail, encryption etc.
styles
: sass abstract definitions and base stylesmiddleware.ts