Skip to content

Commit

Permalink
Admin hub (#78)
Browse files Browse the repository at this point in the history
* ✨feature: Implement basic working example of a login endpoint

* 🖥️ wip: Auth setup with conferences

* 🖥️ wip: test keycloak

* 🖥️ wip: Automated backend glue code generation setup

* 🖥️ wip: keycloak setup & first test use

* 🖥️ wip: Add auth context for keycloak auth state

* 🖥️ wip: Switch to keycloak tokens for sessions

* 🖥️ wip: Send token with backend requests

* Zitadel setup (#38)

* wip: zitadel setup

* WIP Zitadel Setup

* wip: working zitadel setup

---------

Co-authored-by: TheXires <[email protected]>

* 🖥️ wip: backend service cleanup

* 🖥️ wip: working jwt based introspection

* ✨feature: implement zitadel openid solution

* 🖥️ wip: Cleanup backend & use zod for type validation

* 🖥️ wip: first instance of grant manager on session

* ✨feature: implement working authentication & permission management

* 🐞 fix (MUNify): make project build again
branch: auth

* 🧼 format & lint (CHASE Frontend): satisfy linter
branch: auth

* 🧹 chore (CHASE Frontend): update lockfile
branch: auth

* 🏗️ build (CHASE Backend): install all deps for correct types in backend build
branch: auth

* 🐞 fix (AUTH): correct type issues
branch: auth

* 🚧 wip (MUNify): add docs
branch: auth

* 📚 docs (CHASE Backend): add docs for backend & cleanup
branch: auth

* 🐞 fix (CHASE Frontend): remove image optimization
branch: auth

* 🧼 format & lint (MUNify): satsify linter
branch: auth

* 🐞 fix (CHASE Frontend): remove demo code for auth & backend usage
branch: auth

* ✨ feat (CHASE Backend): experimental bun.js / elysia setup

* ✨ feat (CHASE Frontend): Font Awesome Pro
branch: font-awesome-pro

* 🧼 format & lint (CHASE Frontend):
branch: font-awesome-pro

* 🐞 fix (CHASE Frontend): add npmrc file to allow access to private fontawesome registry
branch: font-awesome-pro

* 🐞 fix (CHASE Frontend): use env var to pass secret to npm install
branch: font-awesome-pro

* 🐞 fix (CHASE Frontend): make backend only install necessary packages
branch: font-awesome-pro

* 🚦 ci (CHASE Backend): install all deps
branch: font-awesome-pro

* 🐞 fix (CHASE Frontend): FontAwesome Pro in package.json
branch: font-awesome-pro

* 🚧 wip (CHASE Backend): backend setup
branch: elysia

* 🚧 wip (CHASE Backend): full port to bun
branch: elysia

* 🧹 chore (CHASE Backend): script adaption to bun runtime
branch: elysia

* 🧹 chore (CHASE Backend): convert actions to bun
branch: elysia

* 🚧 wip (CHASE Backend): backend dev script
branch: elysia

* wip (CHASE Backend): elysia wip

branch: elysia

* 🧼 format & lint (CHASE Frontend):
branch: font-awesome-pro

* ✨ feat (CHASE Backend): Committees in DB
branch: elysia

* 🧹 chore (CHASE Backend): Prisma Extension suggestion
branch: elysia

* 🔤 typing (CHASE Frontend): bug
branch: font-awesome-pro

* 🔤 typing (CHASE Frontend): bug
branch: font-awesome-pro

* 🔤 typing (CHASE Frontend): bug
branch: font-awesome-pro

* 🔤 typing (CHASE Frontend): bug
branch: font-awesome-pro

* 🔤 typing (CHASE Frontend): bug
branch: font-awesome-pro

* 🔤 typing (CHASE Frontend): bug
branch: font-awesome-pro

* 🧪 test (CHASE Frontend): Workflow Env update for linter
branch: font-awesome-pro

* 🐞 fix (CHASE Frontend): Fix Dependencies
branch: font-awesome-pro

* ↩️ revert (CHASE Frontend): Remove unnecessary env token in workflow
branch: font-awesome-pro

* ✨ feat (CHASE Frontend): First Onboarding Steps
branch: admin-hub

* 🧹 chore (CHASE Frontend): Name Corrections
branch: admin-hub

* ✨ feat (CHASE Frontend): Shortcuts with Mousetrap
branch: admin-hub

* ✨ feat (CHASE Frontend): First Layout Teampool Page
branch: admin-hub

* ✨ feat (CHASE Frontend): Few Keyboard improvements
branch: admin-hub

* ✨ feat (CHASE Frontend): Committee Overview Backend integration
branch: admin-hub

* ✨ feat (CHASE Frontend): Deletion for Structure Tab
branch: admin-hub

* ✨ feat (CHASE Frontend): Structure Page Fine-Tuning
branch: admin-hub

* 🧼 format & lint (CHASE Frontend): Formatting
branch: admin-hub

* wip: sync

* ✨ feat (CHASE Backend): implement basic committee and conference endpoints
branch: elysia

* 🐞 fix (CHASE Backend): make auth mock more resilient

* 🔀 merge (CHASE Backend): merge backend
branch: elysia-2

* 🧹 chore (CHASE Backend): add bun lock
branch: elysia-2

* 🧼 format & lint (CHASE Backend):
branch: elysia-2

* 🐞 fix (CHASE Backend): migration cleanup
branch: elysia-2

* 🐞 fix (CHASE Backend): ts build options
branch: elysia-2

* 🐞 fix (CHASE Backend): generate prisma types for type checking in backend
branch: elysia-2

* 🐞 fix (CHASE Frontend): generate prisma types in backend to run typechecks agains frontend types
branch: munify/elysia-2

* 🐞 fix (CHASE Frontend): use backend as external package
branch: elysia-2

* 🐞 fix (MUNify): typecheck fixes
branch: elysia-2

* 🚦 ci (CHASE Frontend): add necessary deps
branch: elysia-2

* 🚦 ci (CHASE Frontend): install all on frontend build
branch: elysia-2

* 🚦 ci (CHASE Frontend): fix wdir
branch: elysia-2

* 🧹 chore (MUNify): deps updates
branch: elysia-2

* ✨ feat (CHASE Frontend): New Home Page
branch: admin-hub

* ✨ feat (CHASE Backend): Conference Date
branch: admin-hub

* ✨ feat (CHASE Frontend): Docs and FAQ pages created
branch: admin-hub

* 🧹 chore (CHASE Frontend): A bit of link hosekeeping
branch: admin-hub

* 🧼 format & lint (CHASE Frontend):
branch: admin-hub

* ✨ feat (CHASE Frontend): A little bit of motion
branch: admin-hub

* ✨ feat (CHASE Frontend): More Motion!
branch: admin-hub

* ✨ feat (CHASE Frontend): Even more Motion!
branch: admin-hub

* 🎨 style (CHASE Frontend): Minor animation and style improvements on home page
branch: admin-hub

* ✨ feat (CHASE Frontend): Featurebase Integration
branch: admin-hub

* ✨ feat (CHASE Frontend): Structure and Teampool Sites in onboarding process
branch: admin-hub

* 🚧 wip (CHASE Frontend):
branch: admin-hub

* 🔤 typing (CHASE Frontend): Properly Typing Structure Onboarding Page
branch: admin-hub

* ✨ feat (CHASE Frontend): Committee Chairs, Advisors and Agenda Items
branch: admin-hub

* ✨ feat (CHASE Frontend): Small Improvements
branch: admin-hub

* 🐞 fix (CHASE Frontend): FontAwesome NextJS Bugfix
branch: admin-hub

* ✨ feat (CHASE Frontend): Log in into existing Conferences
branch: admin-hub

* ✨ feat (CHASE Frontend): Delegations Page
branch: admin-hub

* ✨ feat (CHASE Frontend): Better display which chairs/advisors have already been assigned
branch: admin-hub

* ✨ feat (CHASE Backend): Seeding
branch: admin-hub

* ✨ feat (CHASE Backend): Delegation Seeding
branch: admin-hub

* ✨ feat (CHASE Frontend): Better Delegations Table
branch: admin-hub

* ✨ feat (CHASE Backend): Seeding: Assigning Chairs and Advisors
branch: admin-hub

* ✨ feat (CHASE Backend): Seeding the Delegations to Committees
branch: admin-hub

* ✨ feat (CHASE Frontend): Ability to add Delegations
branch: admin-hub

* ✨ feat (CHASE Frontend): i18n
branch: admin-hub

* 🧹 chore (CHASE Frontend): Reinstalling all node Modules
branch: admin-hub

* 🐞 fix (CHASE Frontend): duplicate delegations
branch: admin-hub

* ✨ feat (CHASE Frontend): i18n
branch: admin-hub

* 🚧 wip (CHASE Frontend): Add a NSA onboarding step
branch: admin-hub

* start auth rework

* 🚧 wip (CHASE Backend): auth rework
branch: auth-rework

* 🐞 fix (CHASE Backend): reset db schema
branch: auth-rework

* 🚧 wip (CHASE Backend): apply auth macros to existing backend api from admin branch
branch: auth-rework

* Co-authored-by: Tade Strehk <[email protected]>
🚧 wip (CHASE Backend): email validation flow
branch: auth-rework

* 🚧 wip (AUTH): passkeys
branch: auth-rework

* 🧹 chore (MUNify): adjust commit scopes
branch: auth-rework

* ✨ feat (CHASE Frontend): Update navigation buttons and add bug report link
branch: admin-hub

* wip: login page rework

* 🧹 chore (CHASE Frontend): General Cleanup
branch: admin-hub

* 🐞 fix (CHASE Frontend): Fixing admin/structure
branch: admin-hub

* 🐞 fix (CHASE Frontend): Fix onboarding/teampool
branch: admin-hub

* 🐞 fix (CHASE Frontend): onboarding/committees
branch: admin-hub

* ✨ feat (CHASE Backend): Seeding for new database Schema
branch: admin-hub

* 🐞 fix (CHASE Frontend): onboarding/delegation
branch: admin-hub

* ✨ feat (CHASE Backend): Seeding and Schema Cleanup
branch: admin-hub

* 🧼 format & lint (CHASE Frontend): Update dependencies and fix code formatting issues
branch: admin-hub

* 🐞 fix (CHASE Frontend): rm featurebase
branch: admin-hub

* ✨ feat (CHASE Frontend): Restructuring and Hub Pages
branch: admin-hub

* 🚧 wip (CHASE Frontend):
branch: admin-hub

* 🧹 chore (CHASE Frontend): Update .gitignore file to include .smtp4dev
branch: admin-hub

* 🐞 fix (CHASE Frontend): add elysia to dev deps in chase frontend
branch: admin-hub

* 🧹 chore (MUNify): Add .devcontainer files for Docker setup
branch: admin-hub

* ✨ feat (CHASE Frontend): Refactor Timer component and add CountdownTimer component
branch: admin-hub

* 🧹 chore (MUNify): Update devcontainer configuration
branch: admin-hub

* ✨ feat (CHASE Frontend): Add user route and update header component
branch: admin-hub

* ✨ feat (CHASE Frontend): Add fetching_utils.ts and update page.tsx files
branch: admin-hub

* 🧹 chore (MUNify): Dev Container: Added Extensions
branch: admin-hub

* Add new devcontainer features

* Update devcontainer setup and add Prisma database migration

* ✨ feat (CHASE Frontend): Chair Dashboard
branch: admin-hub

* ✨ feat (CHASE Frontend): Whiteboard
branch: admin-hub

* ✨ feat (CHASE Frontend): Presence Chair Settings connected
branch: admin-hub

* ✨ feat (CHASE Frontend): Presentation Mode connection
branch: admin-hub

* ✨ feat (CHASE Frontend): Timer rework
branch: admin-hub

* 🐞 fix (CHASE Frontend): Refactor Timer component and fix timer toast buga
branch: admin-hub

* 🧹 chore (MUNify): remove unused projects
branch: munify/auth-rework

* Add ms-vsliveshare.vsliveshare to devcontainer.json

* 🚧 wip (CHASE Frontend):
branch: admin-hub

Co-authored-by: m1212e <[email protected]>

* ✨ feat (CHASE Frontend): New Pages directory Structure and Auth Context
branch: admin-hub

* ✨ feat (CHASE Frontend): Add unique constraints and columns to database tables
branch: admin-hub

* ✨ feat (CHASE Frontend): Backend setup for speakers list
branch: admin-hub

* 🚧 wip: sync

* ✨ feat (CHASE Frontend): SpeakersList Database Connection
branch: admin-hub

* ✨ feat (CHASE Frontend): SpeakersList full Connection
branch: admin-hub

* ✨ feat (CHASE Frontend): Fine Tuning
branch: admin-hub

* ✨ feat (CHASE Frontend): Message Service Connection
branch: admin-hub

* 🚧 wip (CHASE Frontend): Inbox
branch: admin-hub

* ✨ feat (CHASE Backend): better error logging
branch: auth-rework

* ✨ feat (CHASE Backend): better error logging
branch: auth-rework

* 🚧 wip (CHASE Frontend): speakers list improvement, inbox
branch: admin-hub

* ✨ feat (CHASE Frontend): finalize login flow
branch: auth-rework

* 🧼 format & lint (CHASE Backend): lint me baby
branch: auth-rework

* ✨ feat (AUTH): reset password
branch: auth-rework

* 🏗️ build (CHASE Backend): add docker build & publish instructions
branch: auth-rework

* ✨ feat (CHASE Frontend): Diverse new small features
branch: admin-hub

* 🐞 fix (CHASE Frontend): link fix
branch: admin-hub

* 🐞 fix (CHASE Backend): use correct return value for myInfo call
branch: auth-rework

* 🚧 wip (CHASE Frontend):
branch: admin-hub

* ✨ feat (CHASE Frontend): Login Flow
branch: admin-hub

* 🚧 wip (CHASE Frontend):
branch: admin-hub

* 🚧 wip (CHASE Frontend):
branch: admin-hub

* 🐞 fix (CHASE Frontend): Fixes and Cleanup
branch: admin-hub

* 🚧 wip (CHASE Frontend): Misc Improvements
branch: admin-hub

* ✨ feat (CHASE Frontend): Better Keyboard Speakers List Workflow for chairs
branch: admin-hub

* ✨ feat (CHASE Frontend): Better Keyboard Speakers List Workflow for chairs
branch: admin-hub

* ✨ feat (CHASE Frontend): Logout Button on gateway
branch: admin-hub

* 🧼 format & lint (CHASE Frontend): lint and format
branch: admin-hub

* 🔤 typing (CHASE Frontend): Fix type errors WIP
branch: admin-hub

* 🏗️ build (CHASE Backend): adjust build login data
branch: admin-hub

* 🔤 typing (CHASE Frontend): Typing
branch: admin-hub

* 🔤 typing (CHASE Frontend): Typing
branch: admin-hub

* 🔤 typing (CHASE Frontend): Typing
branch: admin-hub

* 🐞 fix (CHASE Frontend): fix type scructure for frontend user context
branch: admin-hub

* 🐞 fix (CHASE Frontend): Soften type signature for delegation find function
branch: admin-hub

* 🐞 fix (CHASE Frontend): fix context types
branch: deployment

* 🐞 fix (CHASE Frontend): un undefinify the context types
branch: deployment

* ✨ feat (CHASE Backend): Logout
branch: admin-hub

* ✨ feat (CHASE Frontend): Non State Actors and Special Persons can now be added to the speakers List
branch: admin-hub

* ✨ feat (CHASE Frontend): Better Attendance Monitoring for Chairs
branch: admin-hub

* 🐞 fix (CHASE Backend): Schema fix: "Type" suffix exchanged for "Variant"
branch: admin-hub

* ✨ feat (CHASE Frontend): Cookie Banner and Coming Soon Badges on Landing page
branch: admin-hub

* 🚧 wip (CHASE Backend): export
branch: Branch not found

* ✨ feat (CHASE Frontend): Documentation and FAQ Markdown
branch: admin-hub

* ✨ feat (CHASE Frontend): Mobile Landing Page
branch: admin-hub

* ✨ feat (CHASE Frontend): SimSim Seed WIP
branch: admin-hub

* ✨ feat (CHASE Frontend): Small Error catch
branch: admin-hub

* 🚧 wip (CHASE Frontend): Dashboard Header WIP
branch: admin-hub

* 🐞 fix (CHASE Backend): Change default field name from 'type' to 'variant' in Nation model
branch: admin-hub

* 🧹 chore (CHASE Backend): Remove deprecated migration files and update seed data
branch: admin-hub

* 🐞 fix (CHASE Frontend): Seed
branch: admin-hub

* ✨ feat (CHASE Frontend): NA Integration, Dashboard Header Rework, MISC
branch: admin-hub

* 🐞 fix (CHASE Backend): apply cookie signature only to sessionId by default and require consent for session cookie
branch: admin-hub

* 🚧 wip (CHASE Backend): export
branch: Branch not found

* 🐞 fix (CHASE Backend): re add accidentially deleted committee guard
branch: importexport

* ✨ feat (CHASE Frontend): Different Improvements
branch: admin-hub

* ✨ feat (CHASE Frontend): Added Login Link to Footer
branch: admin-hub

* ✨ feat (CHASE Frontend): NA and Guest Features
branch: admin-hub

* ✨ feat (CHASE Frontend): New SimSim Seeding Mechanism
branch: admin-hub

* ✨ feat (CHASE Frontend): Darkmode improvements
branch: admin-hub

* ⬆️ improvement (CHASE Frontend): improvement option in commit messages
branch: admin-hub

* ✨ feat (CHASE Frontend): Inbox for Chairs and Research Service
branch: admin-hub

* 🔤 typing (CHASE Frontend):
branch: admin-hub

* 🧼 format & lint (CHASE Frontend):
branch: admin-hub

---------

Co-authored-by: m1212e <[email protected]>
Co-authored-by: TheXires <[email protected]>
Co-authored-by: m1212e <[email protected]>
  • Loading branch information
4 people authored Feb 29, 2024
1 parent 76c3558 commit 603ea1e
Show file tree
Hide file tree
Showing 344 changed files with 43,112 additions and 20,361 deletions.
11 changes: 11 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM oven/bun:debian

# Config Bun
ENV PATH="~/.bun/bin:${PATH}"
RUN ln -s /usr/local/bin/bun /usr/local/bin/node

# Update packages
RUN apt-get update

# Install Git
RUN apt-get update && apt-get install -y git
56 changes: 56 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/marcosgomesneto/bun-devcontainers/tree/main/src/bun-postgresql
{
"name": "MUNify Dev Container",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/meaningful-ooo/devcontainer-features/fish:1": {},
"ghcr.io/devcontainers-contrib/features/starship:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or with the host.
"forwardPorts": [
3000,
3001,
5432,
3777,
5968,
6379
],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bash /workspaces/munify/.devcontainer/setup.sh",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"editor.formatOnSave": true,
"files.insertFinalNewline": true
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"biomejs.biome",
"rioukkevin.vscode-git-commit",
"prisma.prisma",
"zainchen.json",
"yoavbls.pretty-ts-errors",
"msjsdiag.vscode-react-native",
"bradlc.vscode-tailwindcss",
"austenc.tailwind-docs",
"stivo.tailwind-fold",
"gruntfuggly.todo-tree",
"ms-vsliveshare.vsliveshare",
"eamodio.gitlens",
"exceedsystem.vscode-macros"

]
}
},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root"
}
54 changes: 54 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: "3.8"

services:
app:
build:
context: .
dockerfile: Dockerfile

volumes:
- ../..:/workspaces:cached

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Runs app on the host network, so that every port is already available from the host.
network_mode: "host"

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

postgres:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
network_mode: "host"

redis:
image: redis
ports:
- '6379:6379'
volumes:
- redis-data:/data
network_mode: "host"

smtp4dev:
image: rnwood/smtp4dev
ports:
- '3777:80'
- '5968:25'
volumes:
- smtp4dev:/smtp4dev
environment:
- RelayOptions__Login=dev
- RelayOptions__Password=dev

volumes:
postgres-data:
redis-data:
smtp4dev:
22 changes: 22 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
echo "Setting Up Devcontainer"
echo "======================="

echo ""
echo "Installing Starship"
echo "-------------------"

mkdir -p ~/.config/fish
touch ~/.config/fish/config.fish
echo "starship init fish | source" > ~/.config/fish/config.fish
echo 'echo "starship init fish | source" > ~/.config/fish/config.fish'


echo ""
echo "Setting up Prisma Database"
echo "--------------------------"

sleep 1
cd /workspaces/munify/chase/backend
bun i
bunx prisma migrate reset --force
bunx prisma migrate dev -n initial_dev_migration
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
node_modules
.next
**/*.pnp
**/*.pnp.js
coverage
out
build
.DS_Store
**/*.pem
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.env*.local
.vercel
*.tsbuildinfo
next-env.d.ts
.postgres-data
.redis-data

chase/backend/prisma/generated
fontawesome-pro-6.4.2/
.env
certificates
.smtp4dev
19 changes: 6 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ jobs:
env:
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}

- name: Generate prisma types
# typecheck the backend since it is required for the frontend
- name: Typecheck backend
working-directory: ./chase/backend
run: bunx prisma generate
run: bun run typecheck

- name: Run build
run: bun run build
Expand All @@ -39,18 +40,10 @@ jobs:
env:
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}

- name: Generate prisma types
- name: Typecheck
working-directory: ./chase/backend
run: bunx prisma generate
run: bun run typecheck

- name: Run build
working-directory: ./chase/backend
run: bun run build

# test if the server starts without errors
- name: Run the server
id: run
env:
CI: "true"
run: |
timeout 20s bun run ./build/main.js || true
run: bun run build
56 changes: 56 additions & 0 deletions .github/workflows/build_publish_container_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build and publish container images
on:
release:
types: [created]

jobs:
# chase-build-frontend:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v2

# - name: Setup Bun.js
# uses: oven-sh/setup-bun@v1

# - name: Install all dependencies
# run: bun i
# env:
# FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}

# # typecheck the backend since it is required for the frontend
# - name: Typecheck backend
# working-directory: ./chase/backend
# run: bun run typecheck

# - name: Run build
# run: bun run build
# working-directory: ./chase/frontend


chase-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: m1212e/chase-backend

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.backend
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
.postgres-data
.redis-data
.redis-data

chase/backend/prisma/generated
fontawesome-pro-6.4.2/
.env
certificates
.smtp4dev
26 changes: 26 additions & 0 deletions .vscode/macros.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const vscode = require("vscode");

module.exports.macroCommands = {
OpenI18n: {
no: 1,
func: async () => {
openI18nFile("/workspaces/munify/chase/frontend/i18n/en/index.ts");
setTimeout(async () => {
await vscode.commands.executeCommand(
"workbench.action.moveEditorToNextGroup",
);
}, 500);
setTimeout(() => {
openI18nFile("/workspaces/munify/chase/frontend/i18n/de/index.ts");
}, 500);
},
},
};

async function openI18nFile(filename) {
const document = await vscode.workspace.openTextDocument(filename);
const editor = await vscode.window.showTextDocument(document);

Check warning on line 22 in .vscode/macros.ts

View workflow job for this annotation

GitHub Actions / biome-linter

This variable is unused.

Check warning on line 22 in .vscode/macros.ts

View workflow job for this annotation

GitHub Actions / biome-linter

This variable is unused.

Check warning on line 22 in .vscode/macros.ts

View workflow job for this annotation

GitHub Actions / biome-linter

This variable is unused.

Check warning on line 22 in .vscode/macros.ts

View workflow job for this annotation

GitHub Actions / biome-linter

This variable is unused.
const save = await vscode.commands.executeCommand(

Check warning on line 23 in .vscode/macros.ts

View workflow job for this annotation

GitHub Actions / biome-linter

This variable is unused.

Check warning on line 23 in .vscode/macros.ts

View workflow job for this annotation

GitHub Actions / biome-linter

This variable is unused.

Check warning on line 23 in .vscode/macros.ts

View workflow job for this annotation

GitHub Actions / biome-linter

This variable is unused.

Check warning on line 23 in .vscode/macros.ts

View workflow job for this annotation

GitHub Actions / biome-linter

This variable is unused.
"workbench.action.files.save",
);
}
33 changes: 33 additions & 0 deletions .vscode/react.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"React Component Setup": {
"prefix": ["page", "component", "new"],
"body": [
"${1|\"use client\";, |}",
"import React, { useState, useEffect } from \"react\";",
"import { useI18nContext } from \"@/i18n/i18n-react\";",
"import { backend } from \"@/services/backend\";",
"",
"export default function ${2:COMPONENT_TITLE}() {",
" const { LL, locale } = useI18nContext();",
" ",
" return (",
" <>",
" ${3}",
" </>",
" );",
"}"
],
"description": "Create a new React page"
},
"Generic Error Toast": {
"prefix": ["toast", "error-toast"],
"body": [
"toast.current?.show({"
" severity: \"error\","
" summary: LL.admin.onboarding.error.title(),"
" detail: LL.admin.onboarding.error.generic(),"
"});"
],
"description": "Create a new generic error toast"
},
}
Loading

0 comments on commit 603ea1e

Please sign in to comment.