A modern Next.js front-end project with enforced code style, linting, and a shared development environment for maximum consistency and productivity.
-
Clone the repository:
git clone <your-repo-url> cd frontend
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
Open http://localhost:3000 in your browser.
-
Set up environment variables: Copy the example environment file and update it as needed:
cp .env.example .env
The
.envfile contains environment-specific variables (such as API keys or secrets) required for the app to run. Edit this file to match your local setup if necessary.
This project is pre-configured for a consistent developer experience. No manual setup is required after cloning!
When you open the project in VS Code, you’ll be prompted to install these extensions (see .vscode/extensions.json):
- Prettier - Code formatter (
esbenp.prettier-vscode) - ESLint (
dbaeumer.vscode-eslint) - Auto Import (
formulahendry.auto-import) - IntelliCode (
VisualStudioExptTeam.vscodeintellicode) - GitLens (
eamodio.gitlens) - Stylelint (
stylelint.vscode-stylelint) - Tailwind CSS IntelliSense (
bradlc.vscode-tailwindcss) - ES7+ React/Redux/React-Native snippets (
dsznajder.es7-react-js-snippets) - Reactjs code snippets (
xabikos.ReactSnippets)
The following settings are committed in .vscode/settings.json:
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}- Format on save is enabled.
- Prettier is the default formatter.
- ESLint auto-fix is enabled on save.
- Prettier is configured in
.prettierrc:{ "semi": true, "singleQuote": true, "printWidth": 100, "tabWidth": 2, "trailingComma": "es5" } - ESLint is configured in
.eslintrc.json:{ "extends": ["next/core-web-vitals", "plugin:prettier/recommended"], "rules": { "prettier/prettier": ["error"] } } - Both tools are included in
devDependenciesand ready to use.
- Start development server:
npm run dev - Build for production:
npm run build - Start production server:
npm run start - Lint code:
npm run lint - Format code:
npm run format
- Pull the latest changes.
- Install dependencies if you haven’t already:
npm install - Use the recommended VS Code extensions for best results.
- Write code!
- All code will be auto-formatted and linted on save.
- Run
npm run lintandnpm run formatbefore committing.
- Open a pull request with your changes.
- Recommended plugins list is documented (see above and
.vscode/extensions.json) - VS Code workspace settings are committed (
.vscode/settings.json) - Prettier and ESLint config files are included and working
- Developers can pull the project and begin coding without manual config