Skip to content
Merged

Dev #64

Show file tree
Hide file tree
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
43 changes: 43 additions & 0 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI integrity checks

on:
pull_request:
branches:
- main
- dev

jobs:
Backend-checks:
name: Backend integrity checks
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Verify Backend Build
run: |
cd Backend
go build -v ./...

Frontend-checks:
name: Frontend integrity checks
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Verify Frontend Build
run: |
cd Frontend/project-CL
npm install
npm run build
125 changes: 125 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# 🚀 Core Life (Project-CL)

[![Build](https://github.com/Arjuna-Ragil/Project-CL/actions/workflows/deploy.yml/badge.svg)](https://github.com/Arjuna-Ragil/Project-CL/actions/workflows/deploy.yml)

![Go Version](https://img.shields.io/badge/Go-1.21-blue?style=for-the-badge&logo=go&logoColor=white)
![React Version](https://img.shields.io/badge/React-18-blue?style=for-the-badge&logo=react)
![Postgres](https://img.shields.io/badge/PostgreSQL-15-336791?style=for-the-badge&logo=postgresql)

> **A private personal ERP to organize my life, built with modern tech stack and enterprise-grade infrastructure.**
>
> 🌐 Live Production: [core-life.arjunaa.my.id](https://core-life.arjunaa.my.id)

## 📖 About The Project

**Core Life** is a personal ERP that I build for myself (now for public) to manage day by day activity, like manage your academic, financial, and more to come

This project is not just a basic CRUD app, but this project act as my playground to show how I implement **FullStack**, **DevOps**, **Security**, **Infrastructure (Self-Host)**, and **automation** that simulate industry standard in a smaller scale.

## ✨ Key Features

* 🔐 **Secure Authentication**: Implementation of JWT Auth in the middleware
* ⚡ **High Performance**: Backend written in **Golang** to decrease latency and for high performance
* 📱 **Responsive UI**: Frontend **React** that is responsive for desktop & mobile
* 📚 **Academic Module**: Manage your classes, assignment, and your GPA
* 💵 **Financial Module**: Manage your money based on your needs, wants, save, dan invest.
* 🔜 **More Modules to Come**

## 🛠️ Tech-Stack

| Frontend | Backend | Database | Devops | Infrastructure |
| :---: | :---: | :---: | :---: | :---: |
| React | Golang | Postgres | Docker | Ubuntu server |
| Tailwind | Gin | | Github Action | Cloudflare tunnel |

## 🏗️ Infrastructure & Architecture

This project is being hosted on my own **Home Server (Used Laptop)**.

### 🔄 CI/CD Pipeline
Every code that has pas the review will automatically be added to the repo by **GitHub Actions**:
1. **Branch `dev`**: Auto-deploy to the **Development** environment (Port 8081/3001).
2. **Branch `main`**: Auto-deploy to the **Production** environment (Port 8080/3000).

### 🛡️ Network & Security
* **Cloudflare Tunnel**: Expose production to the public without port forwarding
* **Tailscale**: Private access to development environtment that I use.
* **CORS Policy**: Strict policy to separate API between dev and prod environtment

### 📐 Architecture Graph
```mermaid
graph TD
User((Public User)) -->|HTTPS| CF[Cloudflare Tunnel]
Dev((Me / Developer)) -->|Tailscale VPN| Server[Home Server]

subgraph "Home Server (Docker Compose)"
CF -->|Port 8080| BE_Prod[Backend Prod]
CF -->|Port 3000| FE_Prod[Frontend Prod]

BE_Prod --> DB_Prod[(Postgres Prod)]

subgraph "Development Environment"
BE_Dev[Backend Dev] --> DB_Dev[(Postgres Dev)]
FE_Dev[Frontend Dev]
end
end
```

## 🌱 Getting Started (Local Development)

### 1. Git clone the project

Clone the project to open it locally
```bash
git clone https://github.com/Arjuna-Ragil/Project-CL.git
cd Project-CL
```

### 2. Create an .env in the root folder

Base config to start running the project
```env
# Database config (change as needed)
DB_HOST=localhost
DB_USER=postgres
DB_PASSWORD=secret
DB_NAME=cl_local_db
DB_PORT=5432

# Backend config
SECRET_KEY=Secret_key_that_you_can_change
AUTH_MODE=false (enable/disable auth middleware)
```

### 3. Create an .env.local in the FE folder

Env to enable communication between FE and BE
```env
VITE_API_BASE_URL=http://localhost:8080/api (change to correspond your backend)
```

### 4. Run in docker

There are two choice on how to run the project:
```docker
# Only build the database, run the FE & BE separately (Recommended)
docker compose up -d --build db

# Build everything from docker
docker compose up -d --build
```

### 5. Access web

* FE: [http://localhost:5173](http://localhost:5173/)
* BE: [http://localhost:8080](http://localhost:8080/)

## 🤝 Contribution
This project is private, but I'm open to talk and discuss about Home Lab Architecture and Devops. Feel free to reach out!

### Built with ❤️ and a lot of ☕ by Arjuna Ragil





Loading