Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme to be accurate #75

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,35 @@

This code powers the Euno bot on Discord.

Initial setup
## Initial setup

```sh
yarn
yarn dev:init
yarn dev
npm i
npm run dev
```

Uses:
## Tech

- [Remix](https://remix.run/docs/en/v1)
- [Kysely](https://kysely.dev/)
- SQLite3 (with [better-sqlite3](http://npmjs.com/package/better-sqlite3))

Deployed with:
### CI/CD

- [GitHub Actions](https://docs.github.com/en/actions)
- [Kubernetes](https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/)
- DigitalOcean managed Kubernetes

Details:
## Implementation Details

migrations with `npm run start:migrate`. latest installed version is tracked in 2 tables of the sqlite data. schema changes must be done cautiously, should have a set up/tear down function tested before merging. Start a new migration with `npx kysely migrate:make <name>`

Migrations are stored in `migrations/`
Generated DB types are stored in `app/db.d.ts` and generated automatically in a precommit hook.
Migrations are stored in `migrations/`.

auth system is simple delegated auth to discord. accounts are created if not found locally, no passwords or secondary confirmation atm
Generated DB types are stored in `app/db.d.ts` and generated automatically in a precommit hook and on app startup.

The code runs on a managed Kubernetes instance on Digital Ocean, using GitHub Actions as CI/CD. The service is configured using a `kustomization.yaml` file, which relies on configuration files within `cluster/`. Most of the configuration is in place to inject secrets stored in GitHub into the service upon deployment. Maybe most confusingly, there's a `k8s-context` file generated as part of CI that exists to pass along the latest Docker image tag from CI into the cluster configuration.

This bot was architected to support a web portal, but the k8s cluster configuration currently is not configured to be exposed to the internet, so it can not be used for a web portal in its current form.

The auth system is simple delegated auth to Discord. accounts are created if not found locally, no passwords or secondary confirmation atm. This system is not currently used for anything, it's a remnant of an earlier project that was abandoned.
Loading