Directory Structure
This section will explain the directory structure of the Corsace repository. This is useful for understanding where to find certain files, and where to put new files. It is also useful for understanding how the repository is organised, and how the different parts of the website interact with each other.
This is only a brief overview of the directory structure.
For more detailed information, click one of the links in the Navigation section below.
Primary Folders
Corsace can be split into three main parts:
- Frontend/Client - The websites and assets the user interacts with. All sites are made with Nuxt 2 aside for this documentation site, which is made with Astro/Starlight.
- Backend/Server - Programs that run on the server, and are sometimes interacted with by the frontend.
- Both/Miscellaneous - Files that are used by both the frontend and backend, or files that don’t fit into either category.
These three parts are represented by the following folders:
The following labels are used to key-note the purpose of each folder:
These are the relevant folders within the repository:
These are the relevant folders within the repository:
📁 AYIM - Frontend/Client
📁 Assets - Frontend/Client
📁 BanchoBot - Backend/Server
📁 Closed - Frontend/Client
📁 DiscordBot - Backend/Server
📁 Docs - Frontend/Client
📁 Interfaces - Both/Miscellaneous
📁 MCA - Frontend/Client
📁 Main - Frontend/Client
📁 Models - Backend/Server
📁 Open - Frontend/Client
📁 Server - Backend/Server
📁 Typing - Both/Miscellaneous
📁 config - Both/Miscellaneous
📁 corsace-chart - Both/Miscellaneous
Navigation
The following section navigation
is currently under construction.
Depending on your focus, you may only need to look at a few of these folders. You can find more specific information for each folder below:
- Frontend/Client
- AYIM/Closed/MCA/Main/Open - Made with Nuxt 2
- Docs - Made with Astro/Starlight
- Assets - Images/Icons, Fonts, CSS, Components, Translations
- Backend/Server
- BanchoBot - Made with Bancho.js
- DiscordBot - Made with Discord.js
- Server/CronRunner - Made with Koa
- Centrifugo - Made with Centrifugo
- Models - Made with TypeORM
- Both/Miscellaneous
- Interfaces - Typing files for communication between Nuxt and Koa
- Typing - Files containing custom type augments for npm libraries
- config - Configuration files for every instance
- corsace-chart - Files for helm chart for Kubernetes
Frontend/Client
These folders are used for the frontend of the website, which is what the user sees and interacts with.
The following folders are website-specific:
- 📁 AYIM - https://ayim.corsace.io
- 📁 Closed - https://closed.corsace.io (Currently does not exist)
- 📁 Docs - https://docs.corsace.io
- 📁 MCA - https://mca.corsace.io
- 📁 Main - https://corsace.io
- 📁 Open - https://open.corsace.io
The remaining folder (📁 Assets) is used for storing the following assets for all of the above websites:
- Images/Icons
- Fonts
- CSS
- Components
- Translations
Backend/Server
The following section backend/server
is currently under construction.
These folders are used for the backend of the website, which either consist of the server that the websites communicate with, or node instances to interact with other services such as Discord, osu!, e.t.c.
The following folders consist of the following services:
- 📁 BanchoBot - An osu! IRC bot
- 📁 DiscordBot - A Discord bot
- 📁 Server
- Server - A node instance that runs the main server for the websites
- CronRunner - A node instance that runs cron jobs created by different server instances
- Centrifugo - A node instance that runs a Centrifugo server
- This doesn’t have a folder, as it is a single file run via npm commands (see Development/Getting Started#Centrifugo for more information), but there are endpoints that exist for it in the 📁 Server folder.
The remaining folder (📁 Models) is used for storing the database models for the server.
Both/Miscellaneous
These folders have their own unique uses that don’t fit into either of the above categories:
- 📁 Interfaces - Typing files for communication between Nuxt and Koa
- 📁 Typing - Custom type augments for various npm libraries used
- 📁 config - Configuration files for every instance
- 📁 corsace-chart - Files for helm chart for Kubernetes