This website is an API interface for the mobile gacha tower defense game Arknights. All data delivered in JSON format is returned in json format.
If the API is missing operators, the cron has likely not hit the route yet. Feel free to raise an issue on Github.
The data stored in the database is based off data from the Gamepress Arknights wiki. Information from the site was scraped using Cheerio and node-html-parser. node-html-parser is amazing and 🔥🔥🔥 blazingly 🔥🔥🔥 ⚡⚡⚡ fast ⚡⚡⚡. I initially used Puppeteer/Playwright, but found that I could hit the script tags with the two above libraries and did not need the headless browser overhead.
The REST API is a Fastify-based API. It is paired with a backend that makes use of a MongoDB database hosted on Railway, as well as a Redis layer to make cache heavy requests. The API is also hosted on Railway.
The API was originally conceived in Javascript before I transitioned it to Typescript, both in the Node.js runtime. It used to use Express and previously used Mongo Atlas and Redis Enterprise. It used to be hosted on cyclic.sh, an awesome way to host fullstack Node.js applications and a great competitor to what Heroku, which was where this used to live.
The website uses SvelteKit, with vanilla CSS and Typescript. The website is deployed on Vercel.
This is a personal project of a university student, so I may not be implementing the best of practices or conventions, but I did learn a lot. I made this with the intention to learn about how APIs worked while also making one. This was the first project I made using Typescript, so the usage of actual Typescript-concepts is very conservative.
The API relies on external updates through POST and PUT requests to add new and update operators because I have yet to setup a cronjob to automatically scrape new operators. This may be implemented later, but for now it seems to work decently.
I made this because I love Arknights, even though I say I hate it when Contigency Contract is active. My favorite operators are, in no particular order: Surtr, Chen, Skadi, Dusk, Frostleaf, Mudrock, Leizi, Schwarz, Rockrock, Siege, Horn, and Texas. I've played since the game released globally.