Superkluster band website.
# Install dependencies
yarn install
# Setup environment variables
cp .env .env.local
vi .env.local
# Run the dev server.
yarn dev
Open http://localhost:3000 with your browser to see the result.
yarn dev
: starts the development serveryarn build
: builds the project for productionyarn start
: starts the production serveryarn test
: runs testsyarn eslint
: shows eslint warnings and errors for all source filesyarn lint-check
: shows output of prettier-eslint for all source filesyarn lint
: runs prettier-eslint on all source files and update them
This project uses prettier and eslint to format the code. The two linters are linked by prettier-eslint.
All code pushed to the repository must respect the coding standards enforced by prettier and eslint.
A pre-commit hook will auto-run prettier-eslint at each commit and format the code automatically then include the resulting code in the commit. This hook is not magic nor meant to replace good coding practices, so code wisely :)
All application code must follow Nextjs recommendations. Try to organize components by functionality and / or pages. Common code should be either in "common" directory (components and assets) or in they own directory at the root of src/ for important stuff such as api abstraction.
Use functional components and hooks whenever possible. Do not use the class syntax.
Styles components should be in the same file as the main component they are used in. Avoid creating
separate styling files as it adds to the cognitive charge of having several files to be aware of
during development for the same component and several files with the exact same name in the IDE.
If a styling component is to be reused in multiple places, do create a separate file.
For the same reason, always prefer naming your files with the name of the component and avoid naming everything index.js. Use an index.js file only if you want to hide some implementation or bundle several files as one logical component (like for ducks).
if you need Redux, use redux-toolkit
This section should cover every cryptic error and weird behaviour of the app that one can encounter during development, so that the next person don't waste half a day like you just did :)
<Explanation on how to fix the error>
<Explanation on why it's doing that because the mock api or whatever>