https://github.com/nachotoast/foundationx
The official website for the FoundationX server network.
https://github.com/nachotoast/foundationx
react typescript
Last synced: 6 months ago
JSON representation
The official website for the FoundationX server network.
- Host: GitHub
- URL: https://github.com/nachotoast/foundationx
- Owner: NachoToast
- License: mit
- Created: 2023-09-21T08:51:38.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-29T22:01:30.000Z (almost 2 years ago)
- Last Synced: 2025-06-21T09:02:03.082Z (about 1 year ago)
- Topics: react, typescript
- Language: TypeScript
- Homepage: https://foundationxservers.com
- Size: 25.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# FoundationX
Centralised API for the FoundationX server network.
[](https://codecov.io/gh/NachoToast/FoundationX)
[](https://github.com/NachoToast/FoundationX/actions/workflows/ci.yml)
[](https://github.com/NachoToast/FoundationX/actions/workflows/deploy.yml)
[](https://github.com/NachoToast/FoundationX/actions/workflows/codeql-analysis.yml)
### Table of Contents
- [Technologies](#technologies)
- [Installation](#installation)
- [Documentation](#documentation)
- [Script Reference](#script-reference)
- [Dependency Reference](#dependency-reference)
- [Secret Reference](#secret-reference)
### Technologies
[](https://bun.com/)
[](https://www.typescriptlang.org/)
[](https://expressjs.com/)
[](https://www.postgresql.org/)
[](https://www.docker.com/)
### Installation
This assumes you have [git](https://git-scm.com/), [Bun](https://bun.com/get), and [Docker](https://www.docker.com/products/docker-desktop/) installed already.
```sh
git clone https://github.com/NachoToast/FoundationX.git
cd FoundationX
bun install
cp .env.example .env
```
Now fill out the `.env` file with the correct values.
If you are using Docker for hosting the PostgreSQL database, you can now start it up using the following command:
```sh
docker compose up --build --detach db
```
The API should be ready to start now, which can be done using:
```sh
bun run start
```
To see other scripts you can run using the `bun run ` syntax, see the [script reference](#script-reference).
### Documentation
Overall architecture is outlined in the [developer Figma design document](https://www.figma.com/board/ZqnQe21dQOwzYBmlF1Vwfw/FoundationX-Systems). If you are a developer and do not have access to this, please contact NachoToast.
#### Script Reference
- `start` - Starts the API with hot reloading enabled.
- `lint` - Runs biome linting checks.
- `lint:fix` - Same as `lint` but fixes the found issues.
- `typecheck` - Runs type checking.
- `test` - Runs unit and integration tests.
#### Dependency Reference
- `cors` - CORS policy management for routes.
- `discord.js` - Discord bot API library, used by our main bot and stats bots.
- `express` - Web server library, hosts routes.
- `express-openapi-validator` - API request and response validation.
- `express-rate-limit` - Rate limiting for API routes.
- `jsonwebtoken` - Session management helper.
- `swagger-ui-express` - Standard spec definitions and `/api-docs` route.
#### Secret Reference
- `CODECOV_TOKEN` is used by the [CI workflow](.github/workflows/ci.yml) to upload code test coverage to [Codecov](https://about.codecov.io/).
- The [deployment workflow](.github/workflows/deploy.yml) uses `HOST`, `USERNAME`, `PASSWORD`, `PORT`, and `DIRECTORY` secrets for SSH.