Skip to content

SimoneErba/dnd-random-spellbook-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

React-Next Boilerplate

pipeline status coverage status latest release

This repository provides a boilerplate for developing a Next.js application with modern tooling and best practices.

πŸš€ Getting Started

Prerequisites

Installation

Clone the repository and install dependencies:

pnpm install # install deps
pnpm husky # to configure git hooks

Authenticate Gitlab registry

  • Create a .npmrc with this basic configuration

If you need an authorization to install private dependencies then add in .npmrc also

@oncode:registry=https://gitlab.oncode.it/api/v4/projects/948/packages/npm/
//gitlab.oncode.it/api/v4/projects/948/packages/npm/:_authToken=${NPM_TOKEN}
always-auth=true

  • Replace ${NPM_TOKEN} with a generated personal gitlab access token

Development

Start the development server:

pnpm dev

Open http://localhost:3000 in your browser.

Building the Application

Generate a production build:

pnpm build

Running Tests

Run unit and integration tests:

pnpm test

Run end-to-end tests with Cypress:

pnpm cypress open

Linting and Formatting

Check for linting issues:

pnpm lint

Format code using Prettier:

pnpm format

Running with Docker

Build and run the application in a container:

docker build -t react-next-app .
docker run -p 3000:3000 react-next-app

πŸ“ Project Structure

react-next-boilerplate
β”œβ”€β”€ .husky/               # Git hooks for enforcing code quality
β”œβ”€β”€ .storybook/           # Storybook configuration for UI component development
β”œβ”€β”€ coverage/             # Code coverage reports
β”œβ”€β”€ cypress/              # End-to-end testing setup with Cypress
β”œβ”€β”€ public/               # Public assets (favicons, images, etc.)
β”œβ”€β”€ src/                  # Main source code for the application
β”œβ”€β”€ test/                 # Unit and integration tests
β”œβ”€β”€ .editorconfig         # Editor configuration for consistent formatting
β”œβ”€β”€ .gitignore            # Files and directories to ignore in Git
β”œβ”€β”€ .gitlab-ci.yml        # CI/CD pipeline configuration for GitLab
β”œβ”€β”€ .prettierignore       # Files ignored by Prettier
β”œβ”€β”€ .prettierrc.json      # Prettier configuration for code formatting
β”œβ”€β”€ .pnpmrc               # Pnpm configuration
β”œβ”€β”€ CHANGELOG.md          # Changelog for tracking changes
β”œβ”€β”€ cypress.config.ts     # Cypress configuration for end-to-end testing
β”œβ”€β”€ Dockerfile            # Docker configuration for containerizing the application
β”œβ”€β”€ eslint.config.mjs     # ESLint configuration for linting
β”œβ”€β”€ next.config.ts        # Next.js configuration file
β”œβ”€β”€ package.json          # Project dependencies and scripts
β”œβ”€β”€ postcss.config.mjs    # PostCSS configuration for styling
β”œβ”€β”€ tailwind.config.js    # Tailwind CSS configuration for styling
β”œβ”€β”€ README.md             # Project documentation
β”œβ”€β”€ tsconfig.json         # TypeScript configuration
β”œβ”€β”€ vitest.config.mts     # Vitest configuration for unit testing
β”œβ”€β”€ pnpm-lock.yaml        # Pnpm lockfile for dependency management

πŸ“œ Configuration Files

.gitlab-ci.yml

Defines CI/CD pipeline for GitLab, automating testing and deployment.

next.config.ts

Customizes Next.js settings, including API routes, rewrites, and more.

cypress.config.ts

Sets up Cypress for end-to-end testing.

eslint.config.mjs

Defines linting rules for consistent code style.

postcss.config.mjs

Configures PostCSS for handling CSS transformations.

vite.config.ts

Configures Vite for fast development builds.

vitest.config.mts

Configures Vitest for running unit tests efficiently.

tsconfig.json

Defines TypeScript compiler options.

Dockerfile

Defines the Docker image setup for containerizing the application.

.husky/*

Defines git hooks operations.

.editorconfig

Configures consistent code formatting across various editors.

.nycrc.json

Configures NYC for code coverage with Istanbul.

.pnpmrc

Configures Pnpm for consistent dependency management.

tailwind.config.js

Configures Tailwind CSS for styling.

πŸ“œ Additional Documentation

🀝 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Generate your spellbook randonly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published