The backend service for Unggoy Web which is a website to browse Halo Infinite user generated content, and create playlists out of the UGC.
- Bun js runtime
- Microsoft Entra Id project
- S3 Storage or local alternative such as MinIO
- Docker (for running tests only)
Clone the project
Go to the project directory
Install dependencies
bun install
Run the database migrations
bunx prisma migrate dev
Start the server
bun run dev
To get login actions working you need to provide your own xbox spartan token. This project is unafilliated with Microsoft and I am not responsible if anything happens to your Microsoft account following the steps below You can look at the code in auth.ts and authTools.ts to see how i programatically got my tokens. You will need to manually enter the following into the Oauth table in your development database:
- userId
- spartanToken
- spartanTokenExpiresAt
- refreshToken(microsoft account)
- clearanceToken
Also the userId needs to be added in your .env file as OAUTH_USER="userId"
To run this project, you will need to add environment variables to your .env file. Check out the example.env
file for all the required variables
OAUTH_USER is the user id from the database of your development user you manually inject into the database
Current test run, but are not finished to fully test all endopinds and input combindations
Tests require Docker to work. To run tests, run the following command
bun run test
After you are done with testing run the following to stop the testing container
bun run docker:down
Plans for individual unit tests with mocks instead of an actual database and S3 instance are planned for v1.0 release.
Contributions are always welcome! Come chat on Discord before contributing to make sure im not already working on something similar
For issues report them on the repos issues page. For suggestions or other things ask around on the Discord