Next.js 14+ using the App Router system with TypeScript, TailwindCSS and ESLint.
Follow the steps in Setting Up Your Dev Environment before working with the codebase.
Additionally, there are resources linked under the Contribution Guide for the tools used in this repo.
Node.js is a runtime environment that is used to run Javascript code. It comes with the Node Package Manager (npm) that helps us manage the Javascript packages used in our project. To set up node.js:
Download and run the installer for your OS from https://nodejs.org/en/download/current. After the installation, open a terminal and run node --version
to verify your node installation and npm --v
to verify your npm installation. You may need to update your Environment Variables and restart your IDE or computer for those commands to work.
If you already have node: Try to update your node version to roughly v21.1.0 so you don't get random warnings.
Download the ESLint Extension by Microsoft for linting support. The configuration in .vscode
folder of this repo enables auto-formatting on save and tab sizes.
(Optional) Auto Rename Tag - useful for JSX.
< ### 3. Database Setup as needed >
This is a Next.js project bootstrapped with create-next-app
.
Install all dependencies:
npm install
Run the development server:
npm run dev
Run a linting test:
npm run lint
- TypeScript documentation
- React documentation
- Next.js (App Router) documentation
- TailwindCSS documentation
To keep this codebase organized and clean, please follow this structure. The template has a bunch of placeholder files to ensure the otherwise empty folders appear on GitHub.
Holds all the source code and is organized into
(api)
: backend_actions
: for server actions_data
: for JSON files_utils
: for utility functionsapi
: for api endpoints
(pages)
: frontend_components
: for components shared across route, organized into sub-directories for each component_contexts
: for react contexts_data
: for JSON files_globals
: for global configuration files_hooks
: for react hooks
Notes:
- If your app only has a frontend, feel free to delete the
(api)
folder. - This template has both Sass and Tailwind configured. Feel free to remove the configuration that your app doesn't use.
Can be used for migration, seeding and other scripts for external components of the app.
Holds assets like images, videos, etc. To keep it organized, create a new folder for each route the assets are related to.