Welcome to the Apollon2 Monorepo! This repository uses npm workspaces to manage multiple packages (including a server, webapp, and library) in a single codebase.
Ensure you have the following installed:
-
Node.js:
- This project uses a specific Node.js version as indicated in the
.nvmrc
file. - Use nvm (Node Version Manager) to install/manage Node versions:
Then, load
brew install nvm
nvm
into your shell:export NVM_DIR="$HOME/.nvm" [ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh"
Once
nvm
is set up:nvm install nvm use
- This project uses a specific Node.js version as indicated in the
-
npm(comes with Node.js):
- This monorepo uses npm workspaces, which are supported out-of-the-box in npm 7+.
- Verify your npm version:
npm -v
-
Clone the repository:
git clone [email protected]:ls1intum/Apollon2.git cd Apollon2
-
Use the correct Node.js version:
nvm install nvm use
-
Install dependencies for all packages:
npm install
-
Build all packages:
npm run build
-
Start the project:
npm run start
After setup, verify that you have the correct versions installed:
- Node.js:
This should match the version specified in the
node -v
.nvmrc
file.
Here is a brief overview of the project structure:
apollon2/
├── standalone/
│ ├── server/
│ │ ├── src/
│ │ ├── package.json
│ │ └── ...
│ └── webapp/
│ ├── src/
│ ├── package.json
│ └── ...
├── library
│ ├── src/
│ ├── package.json
| └── ...
│
├── .nvmrc # Specifies the Node.js version
├── .prettierrc # Configuration file for formating typescript files
├── commitlint.config.mj # Checking commit messages in format
└── README.md # Project documentation
Here are the commonly used scripts defined in the monorepo:
- Install dependencies:
npm install
- Build all packages:
npm run build
- Start the project:
npm run start
- Check linting of the project :
npm run lint
- Fixes formatting issues :
npm run format
- Checks formatting issues without fixing them :
npm run format:check
- If you encounter issues with Node.js versions, ensure you have the correct version installed by running:
nvm use
- If a package fails to build, check its individual
package.json
for specific build scripts and dependencies.
We welcome contributions! Please follow the steps below to contribute:
- Fork the repository.
- Create a feature branch.
- Commit your changes and push them to your fork.
- Submit a pull request.
Thank you for using and contributing to our monorepo!