A simple web template for build websites with Next.js using echo Webkom's tech stack.
- Clone the repository
git clone [email protected]:echo-webkom/web-template.git
- Copy
.env.example
to.env
and fill in the values
cp .env.example .env
- Install dependencies
pnpm install
- Start the database
pnpm db:up
Will run the database in the background in a Docker container. Available at localhost:5432
.
- Run the migrations
pnpm db:deploy
- Start the development server
pnpm dev
- Open http://localhost:3000 with your browser to see the result.
pnpm dev
- Start the development serverpnpm build
- Build the application for productionpnpm start
- Start the production serverpnpm lint
- Run ESLintpnpm db:up
- Build and start the databasepnpm db:down
- Stop and remove the databasepnpm db:migrate
- Create a new migrationpnpm db:deploy
- Run all pending migrationspnpm db:seed
- Seed the database
prisma/
- Prisma schema and seed scriptmigrations/
- Database migrations generated by Prismaschema.prisma
- Prisma schemaseed.ts
- Database seed script
public/
- Static assets (favicon, images, etc.)src/
- Source codecomponents/
- React componentsapp/
- Page router using Next.js' app-router (SSR) (https://nextjs.org/docs/app)styles/
- Styling for the applicationlib/
db/
- Prisma client and other database related codeutils.ts
- Utility functions
.env
- Environment variables.eslintrc.js
- ESLint configurationdocker-compose.yml
- Docker Compose configurationnext.config.mjs
- Next.js configurationpackage.json
- Package manifestpnpm-lock.yaml
- Package lock file. Keeps track of exact versions of dependenciestailwind.config.ts
- Tailwind CSS configuratio`tsconfig.json
- TypeScript compiler options