generalui / react-nextjs-boilerplate

A boilerplate repository for a ReactJS with NextJS, Typescript, testing, linting, code formatting, scripts, and other useful tools.
5 stars 1 forks source link

This is a Next.js project bootstrapped with create-next-app.

Getting Started

  1. First, make sure you are using node v16.13.0. If you are using nvm, run nvm use to set a compatible version. Check out .nvmrc
  2. Install dependencies: yarn
  3. Start up the dev database: yarn run docker:db (make sure Docker is running)
  4. Initialize the DB: yarn prisma:migrate:dev
  5. Run the dev server: yarn dev
  6. Open http://localhost:3000 with your browser to see the result.
  7. Log in with test@email.com and testPassw0rd!

Testing

  1. setup testing: npx playwright install
  2. test: yarn test

Development

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Next steps

To get started with building out your app see the development documentation.

Contributing

To make a contribution or ask questions see the contributing documentation.