Skip to content

Production-grade Spring Boot API powering Excel-to-Gantt automation. Secure JWT auth, Excel ingestion, PostgreSQL persistence.

Notifications You must be signed in to change notification settings

krs1zzet/ChartFlow-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

191 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChartFlow

Excel → Gantt automation for teams. Built with Spring Boot + React + PostgreSQL, running locally without Docker for faster dev iteration.

Java Spring Boot React Vite Tailwind PostgreSQL


✨ LIVE!

✨ Features

  • Excel ingestion (XLSX/CSV via Apache POI) → persist workbook metadata, sheet details & cell‑level data.
  • Mapping parsed cells → GanttDTO (projects, tasks, dependencies, progress).
  • Auth with JWT (cookie‑based) for secure login.
  • React frontend (TSX, Tailwind) with Gantt chart renderers.
  • Local dev friendly: backend, frontend, and db run separately.
  • Export gantt Excell and PNG formats.

🧭 Project Structure

apps/
  chartflow/
    backend/                 # Spring Boot
    frontend/                # React 19 + Vite + Tailwind
    infra/                   # docker-compose, Caddyfile (only for deployment)

🏗️ Architecture

[ React 19 (Vite) ]
          │
          ▼
[ Spring Boot (JWT, Excel Parser) ]
          │
          ▼
[ PostgreSQL ]

🧰 Tech Stack

  • Backend: Java 17+, Spring Boot 3.x, Spring Security, JPA, Apache POI
  • Frontend: React 19, TypeScript, Tailwind, Vite
  • DB: PostgreSQL 15+

🚀 Local Setup

1️⃣ Start PostgreSQL (Docker)

If you already have PostgreSQL locally, skip this step.

docker run --name chartflow-db \
  -e POSTGRES_DB=chartflow \
  -e POSTGRES_USER=chartflow \
  -e POSTGRES_PASSWORD=supersecret \
  -p 5432:5432 -d postgres:15

2️⃣ Run Backend (Spring Boot)

cd backend
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev

application-dev.yml:

spring:
  datasource:
    url: jdbc:postgresql://localhost:5432/chartflow
    username: chartflow
    password: supersecret
  jpa:
    hibernate:
      ddl-auto: update
  security:
    user:
      name: admin
      password: admin
security:
  jwt:
    secret: a-string-secret-at-least-256-bits-long
    expiration: 3600000
    issuer: ChartFlowApp
    cookie-name: AUTH
    cookie-secure: false
app:
  cors:
    allowed-origins:
      - http://localhost:5173

3️⃣ Run Frontend (React)

cd frontend
pnpm install
pnpm dev

Create .env.local:

VITE_API_BASE_URL=http://localhost:8080/api

Then open: http://localhost:5173


🔐 Authentication

  • Login sets an HTTP-only JWT cookie (AUTH).

  • Cookie security rules:

    • In dev, JWT_COOKIE_SECURE=false (allows HTTP).
    • In prod, must be true and use HTTPS.
  • You can test JWT flow in browser → Application → Cookies → AUTH.


⚙️ Common Local Issues

Problem Fix
DB connection refused Make sure PostgreSQL is running and URL = jdbc:postgresql://localhost:5432/chartflow
CORS 403 Add frontend origin to app.cors.allowed-origins in application-dev.yml
JWT cookie missing Disable Secure in dev (cookie-secure: false)

🧪 Testing

Backend uses JUnit + Spring Boot Test. Frontend uses Vitest + React Testing Library.

Run backend tests:

./mvnw test

Run frontend tests:

pnpm test

🗺️ Roadmap

  • Add Flyway migrations
  • Per-user projects & share links
  • Jira API entegration

About

Production-grade Spring Boot API powering Excel-to-Gantt automation. Secure JWT auth, Excel ingestion, PostgreSQL persistence.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published