Skip to content

StudentKickOff/blueprint

 
 

Repository files navigation

Blueprint

TODO:

  • Check if the project works 😅

A blueprint for a new SKO project.

Some changes are required before you can use it!
See later in the readme

The blueprint provides the following features

  • A backend with the following layers
    1. Database
    2. Repository
    3. Service (can be merged with the repository layer depending on the project size)
    4. API
  • Authentication
  • Permissions
  • Postgres DB
  • Redis
  • Minio

If a feature is not needed then simply remove all references to it.

How to use

  1. Copy the repository to your new project.
  2. Grep in the entire blueprint for the keyword 'blueprint'. Change every instance to your new project name.
  3. Install the githooks (optional) with git config --local core.hooksPath .githooks/.
  4. Setup infisical.
    1. Install the CLI.
    2. Inside ~\.bashrc (or equivalents) add the following line export INFISICAL_API_URL=https://secrets.it.studentkickoff.be.
    3. Login to infisical with infisical login.
  5. Setup your project in coolify:
    1. The following resources are required:
    • A docker registry server that pulls from registry.studentkickoff.be/{project_name}
    • A Postgres instance
    • A Redis instance
    1. Change every instance of <projectId> to your newly created project
  6. Setup your project in the secrets website.
    1. Go to the secrets website.
    2. Add new project (choose the prod-dev template).
    3. Infisical doesn't give everyone access to the project automatically. Give the rest of team software access in the access control menu.
    4. Set the following secrets:
      1. For development:
      • AUTH_MSENTRA_CLIENT_SECRET & AUTH_MSENTRA_CLIENT_ID: A rotating azure secret.
      • AUTH_MSENTRA_TENANT_ID: Azure tenant id.
      • AUTH_SKO_CLIENT_SECRET: Add your new project to the Auth seeds and set the client secret.
      1. For production:
      • AUTH_MSENTRA_CLIENT_SECRET & AUTH_MSENTRA_CLIENT_ID: A rotating azure secret.
      • AUTH_MSENTRA_CALLBACK_URL: Production callback url after logging in. Usually something like https://{project_name}.studentkickoff.be/api/auth/callback/azureadv2.
      • AUTH_MSENTRA_TENANT_ID: Azure tenant id.
      • APP_DSN (only production): The sentry DNS link. You can get this by creating a new sentry project.
      • AUTH_REDIRECT_URL: Redirect url after a login.
      • AUTH_SKO_CLIENT_SECRET: Create the project in the Auth UI and set the client secret.
      • DB_HOST: Host of the db. Retrievable from coolify when creating a postgres instance.
      • DB_PASSWORD: Password of the db. Can be found inside coolify.
      • MINIO_BUCKET: Minio bucket. Everything minio related can be configured in the Garage ui
      • MINIO_ENDPOINT: Minio endpoint, usually s3.studentkickoff.be.
      • MINIO_PASSWORD: Minio password.
      • MINIO_SECURE: If the connection to minio is secure, usually true.
      • MINIO_USERNAME: Minio username.
      • REDIS_URL: The redis connection url. Retrievable from coolify when creating a redis instance.
  7. Install all the required tools. The version can be found inside the asdf file.
  8. Download the required tools and packages with make setup.
  9. Migrate the database make migrate.
  10. Run the project make watch.
  11. You should be able to navigate to the frontend and log in.
  12. Update this readme to contain relevant information about your project!

About

A golang fiber web server boilerplate with a React SPA frontend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 49.3%
  • TypeScript 41.3%
  • Dockerfile 2.5%
  • JavaScript 2.4%
  • Makefile 2.3%
  • CSS 1.0%
  • Other 1.2%