amiv Website
This is the home of the amiv website.
🚀 Quick start
-
Development
Navigate into the project directory, install all dependencies and run the development server using the following commands:
yarn install yarn run dev
You can visit the website now at http://localhost:3000
-
Development with Devcontainer (VSCode)
You can run the prepared development environment with docker and VSCode without the need to install anything project-specific on your system.
Requirements:
- (Windows only) Windows Subsystem for Linux (WSL)
- Docker Engine
- Visual Studio Code(VSCode)
- Remote Development Extension Pack for VSCode
Open the project directory with the prepared devcontainer by clicking the green button in the left button corner of the VSCode window and select
Remote-Containers: Open Folder in Container...
.On startup,
yarn install
is run automatically. You can start the gatsby development process withyarn run dev
.You can visit the website now at http://localhost:3000
IMPORTANT: You also have to run the backend project on your machine! It is not possible to use an externally hosted backend.
-
Linting & Formatting
We use
eslint
andprettier
for linting and formatting of the javascript code. You can use the following commands:yarn run eslint yarn run format
-
Production Build
You can prepare a production build manually.
yarn run build
For more information about deployment, read the section about deployment below.
🧐 What's inside?
A quick look at the most important files and directories of the project.
.
├── next.config.js
├── middleware.js
├── config.js
├── content/
├── public/
├── locales/
├── pages/
└── lib
├── components
├── content
├── context
├── hooks
├── images
├── intl
├── pages
├── store
├── utils
└── theme.js
-
next.config.js
: This file is where Next.js is looking for its configuration. See next.config.js Reference. -
middleware.js
: This file allows to run code before a request is completed. See Middleware Reference. -
config.js
: This file is where the configuration of the website project is located. -
/content
: This directory contains Markdown and image files used within the project. The files are either referenced directly or loaded while building the project dynamically. -
/public
: All files within this directory are directly copied to the build output directory. -
/locales
: Translation files used byreact-intl
. -
/pages
: Everyjs
file represents a page which path is exactly like the folder structure and filename.Note: Every file starting with an underscore (
_
) in the pages directory is ignored. Those pages are mostly being used for client-only routes. Therefore no page route is created and no server-side rendering performed.Example: The file
/src/pages/amiv/about.js
will serve the component defined in that file as a page at the path/amiv/about
. -
/lib
: This directory contains all source code.-
/lib/components
: Contains all components used somewhere on the website. -
/lib/context
: Custom React Context -
/lib/hooks
: Custom React hooks. -
/lib/icons
: Custom icon components. -
/lib/store
: This directory contains all files related to data handling usingreact-redux
. -
/lib/utils
: Collection of utility functions. -
/lib/theme.js
: Theme definition for light/dark mode (dimensions, colors, etc.)
-
💫 Deployment
TODO: Add information about the deployment process of the project.