Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

feat: accounts progress; use bun for the api server; #111

Open
wants to merge 49 commits into
base: master
Choose a base branch
from

Conversation

lmssiehdev
Copy link
Contributor

@lmssiehdev lmssiehdev commented Sep 2, 2024

Endpoints

  • /api/profile/
    • loadoutPriv
  • /api/username/
    • Username change time
  • /api/loadout/
  • /api/logout/
  • /api/delete/
  • /api/auth/
    • Google
    • Discord
  • /api/set_item_status/
  • /api/unlock/

Minimal guide

Accounts are optional, set accountsEnabled to false in config.ts to disable them.
If disabled, you can skip these steps.

 cd /server

 # Copy the example environment file
 # optional during development, you can test account features without it
 cp .env.example .env

 # Generate and apply the database schema (creates and populates the SQLite file)
 # run this everytime you make changes to the schema.ts
 pnpm run db:generate
 pnpm run db:migrate

 # Start the server
 pnpm run dev
 # or
 # pnpm run dev:api
 # pnpm run dev:game

worth skimming over https://orm.drizzle.team/docs/migrations#migrations

@lmssiehdev lmssiehdev marked this pull request as draft September 2, 2024 02:32
@Jarred-Sumner
Copy link

nice

@leia-uwu
Copy link
Owner

leia-uwu commented Sep 2, 2024

looking good!
will def merge when its ready!

@lmssiehdev lmssiehdev marked this pull request as ready for review September 12, 2024 19:02
@lmssiehdev
Copy link
Contributor Author

lmssiehdev commented Sep 14, 2024

ignoring the conflicts, this should be ready for review 🤞

turning this into a draft again cuz i want to add the tables for the stats/leaderboard and add google as an auth provider

@lmssiehdev
Copy link
Contributor Author

I don't think I can get to the conflicts today, so feel free to resolve them.

@leia-uwu
Copy link
Owner

rebasing rn
damn bun / hono HTTP api is so much fucking better than uws

@leia-uwu
Copy link
Owner

i think we should be consistent about api keys on config or env
i like env more even if it ads fragmentation
but with the config json thats on gitignore being merged with the config so you have a way to not push local configs idk if theres a reason to use env

@lmssiehdev
Copy link
Contributor Author

I think we should keep all secrets in the .env file and the config for game related stuff, but whatever option is fine honestly.

@lmssiehdev lmssiehdev marked this pull request as ready for review October 19, 2024 21:23
@leia-uwu
Copy link
Owner

ye i think .env is the best

@leia-uwu
Copy link
Owner

are the files on server/src/api/db/drizzle supposed to be committed?

@lmssiehdev
Copy link
Contributor Author

It's recommended, yes.

@leia-uwu
Copy link
Owner

It's recommended, yes.

ig we can at least add the folder to biome ignore so it stops trying to format it lmao

@lmssiehdev lmssiehdev changed the title feat(WIP): accounts progress; use bun for the api server; feat: accounts progress; use bun for the api server; Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants