Skip to content

small application to track progress on various different things

Notifications You must be signed in to change notification settings

Eeritvan/progress-tracker

Repository files navigation

CI/CD pipeline

Table of Content

The App

A simple progress tracking app with the following features:

  • User authentication (register & login)
  • Progress tracking
    • Create and manage trackable items
    • Customize items with icons and colors
    • Reorder items via drag-and-drop
  • Customization
    • Multiple theme support

Tech Used

  • The frontend is made with Vite and React
  • The backend consists of two Go microservices:
    • users-service for user accounts
    • data-service for storing data
  • Both microservices have their own PostgreSQL databases for storing data
  • Each service communicates via GraphQL

rough high-level overview of the application:

C4Context
    title Progress tracking application
    Boundary(app, "The application") {
        System(client, "Frontend")

        Boundary(microservices, "Microservices") {
            System(users-svc, "Users Service", "Microservice responsible of authentication and account data")
            System(data-svc, "Data Service", "Microservice responsible of all the data and data transfers")
            Boundary(databases, "DBs") {
                SystemDb(users-db, "users-database", "A PostgreSQL database to store all the users")
                SystemDb(data-db, "data-database", "A PostgreSQL database to store all the data")
            }
        }
    BiRel(users-svc, users-db, "uses")
    BiRel(data-svc, data-db, "Uses")
    BiRel(client, users-svc, "GraphQL")
    BiRel(client, data-svc, "GraphQL")
}

Loading

Project Structure

the project is a monorepo containing the following services:

  • client/ - React frontend application
  • data-service/ - Go microservice for data management
  • users-service/ - Go microservice for user authentication

Installation

Local

Prerequisites

  • Node.js 18+ for the frontend
  • Go 1.24.3+ for the backend services
  • PostgreSQL database for each service
  1. Clone this repository
  2. Ensure you have 2 psql databases for each microservice. Those must be set as env variables for each microservice. Check both microservices READMEs for more info.
  3. Check client README for installation
  4. Check data-service README for installation
  5. Check users-service README for installation
  6. You should see your application at URL the client gave you.

Docker Compose

  1. Clone this repository
  2. Ensure Docker is installed
  3. Create .env with the following content
    JWT_KEY=<YOUR_KEY>
    POSTGRES_PASSWORD=<YOUR_PASSWORD>
  4. Run docker compose up
  5. The app should be available at the URL: localhost:5173

Kubernetes

Prerequisites

  • k3d installed
  • KubeCLI installed
  • Probably some basic knowledge of kubernetes
  1. Clone this repository
  2. Create a k3d cluster: k3d cluster create --port 8082:30080@agent:0 -p 8081:80@loadbalancer --agents 2
  3. Create secret.yaml files:
# data-service/manifests/secret.yaml
apiVersion: v1
kind: Secret
metadata:
  name: data-svc-secret
data:
  JWT_KEY: <YOUR_KEY_WITH_BASE64_ENCODING>
  DB_PASSWORD: <YOUR_PASSWORD_WITH_BASE64_ENCODING>

---

# users-service/manifests/secret.yaml
apiVersion: v1
kind: Secret
metadata:
  name: users-svc-secret
data:
  JWT_KEY: <YOUR_KEY_WITH_BASE64_ENCODING>
  DB_PASSWORD: <YOUR_PASSWORD_WITH_BASE64_ENCODING>
  1. Uncomment the secret.yaml rows in the ./kustomization.yaml file at the root of the project
  2. Run kubectl apply -k .
  3. The application should be available at the URL: localhost:8081 in a few minutes

About

small application to track progress on various different things

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published