diff --git a/.env.example b/.env.example deleted file mode 100644 index 124b387..0000000 --- a/.env.example +++ /dev/null @@ -1,12 +0,0 @@ -# Example environment variables for Chronos -# PostgreSQL -POSTGRES_USER=chronos -POSTGRES_PASSWORD=chronos -POSTGRES_DB=chronos - -# Redis -REDIS_URL=redis://redis:6379 - -# Application -DATABASE_URL=postgres://chronos:chronos@postgres:5432/chronos?sslmode=disable -REDIS_URL=redis://redis:6379 diff --git a/IMPLEMENTATION_PROGRESS.md b/IMPLEMENTATION_PROGRESS.md deleted file mode 100644 index ee7ee4f..0000000 --- a/IMPLEMENTATION_PROGRESS.md +++ /dev/null @@ -1,4 +0,0 @@ -# Implementation Progress - -* **Phase 0 – Repository Initialization**: Created project structure, API skeleton, Docker Compose, and documentation placeholders. -* **Next Steps**: Add database migration scripts, health checks, and basic authentication. diff --git a/architecture.md b/architecture.md deleted file mode 100644 index f9a12d1..0000000 --- a/architecture.md +++ /dev/null @@ -1,10 +0,0 @@ -# Architecture - -Chronos is composed of several loosely coupled services: - -* **API Server** – HTTP REST API (chi) exposing workflow CRUD, scheduling, and execution APIs. -* **Scheduler** – Periodically evaluates cron expressions and enqueues executions. Runs as a separate container. -* **Worker** – Pulls execution tasks from the queue, runs nodes, and reports back. -* **Frontend** – SPA built with React/Tailwind/React Flow. - -All services communicate over a local network (Docker Compose). Data is persisted in PostgreSQL; Redis is used for lightweight coordination. diff --git a/backend/Dockerfile b/backend/Dockerfile deleted file mode 100644 index 3780b92..0000000 --- a/backend/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM golang:1.21-alpine AS builder -WORKDIR /app -COPY go.mod go.sum ./ -RUN go mod download -COPY . . -RUN go build -o /app/chronos ./main.go - -FROM alpine -WORKDIR /app -COPY --from=builder /app/chronos . -EXPOSE 8080 -CMD ["./chronos"] diff --git a/backend/go.mod b/backend/go.mod deleted file mode 100644 index 14c63db..0000000 --- a/backend/go.mod +++ /dev/null @@ -1,15 +0,0 @@ -module github.com/alvin/chronos - -go 1.21 - -require ( - github.com/go-chi/chi/v5 v5.0.0 - github.com/go-chi/chi/v5/middleware v5.0.0 - github.com/lib/pq v1.10.9 - github.com/go-redis/redis/v8 v8.11.4 - golang.org/x/crypto v0.21.0 - github.com/gorilla/handlers v1.5.1 - github.com/pressly/goose v3.5.3 - github.com/stretchr/testify v1.9.0 - google.golang.org/grpc v1.60.0 -) diff --git a/backend/main.go b/backend/main.go deleted file mode 100644 index 31e55e7..0000000 --- a/backend/main.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "log" - "net/http" - "os" - - "github.com/go-chi/chi/v5" - "github.com/go-chi/chi/v5/middleware" - "github.com/go-chi/chi/v5/middleware" -) - -func main() { - r := chi.NewRouter() - r.Use(middleware.Logger) - r.Get("/health", func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - w.Write([]byte("OK")) - }) - - addr := ":8080" - if p := os.Getenv("PORT"); p != "" { - addr = ":" + p - } - log.Printf("Starting server on %s", addr) - if err := http.ListenAndServe(addr, r); err != nil { - log.Fatalf("server failed: %v", err) - } -} diff --git a/changelog.md b/changelog.md deleted file mode 100644 index 4e93f07..0000000 --- a/changelog.md +++ /dev/null @@ -1,3 +0,0 @@ -# Changelog - -* 2026-11-21 – Initial repository scaffold for Chronos. API server, Docker Compose, and basic health endpoint implemented. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 39fcc62..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,46 +0,0 @@ -version: "3.9" -services: - postgres: - image: postgres:16-alpine - restart: unless-stopped - environment: - POSTGRES_USER: chronos - POSTGRES_PASSWORD: chronos - POSTGRES_DB: chronos - volumes: - - postgres_data:/var/lib/postgresql/data - healthcheck: - test: ["CMD-SHELL", "pg_isready -U chronos"] - interval: 10s - timeout: 5s - retries: 5 - - redis: - image: redis:7-alpine - restart: unless-stopped - command: ["redis-server", "--save", "", "--appendonly", "no"] - volumes: - - redis_data:/data - healthcheck: - test: ["CMD-SHELL", "redis-cli ping"] - interval: 10s - timeout: 5s - retries: 5 - - chronos-api: - build: ./backend - restart: unless-stopped - environment: - DATABASE_URL: postgres://chronos:chronos@postgres:5432/chronos?sslmode=disable - REDIS_URL: redis://redis:6379 - ports: - - "8080:8080" - depends_on: - postgres: - condition: service_healthy - redis: - condition: service_healthy - -volumes: - postgres_data: - redis_data: diff --git a/security.md b/security.md deleted file mode 100644 index 67bcc64..0000000 --- a/security.md +++ /dev/null @@ -1,12 +0,0 @@ -# Security - -Chronos implements the following security measures: - -* Passwords are hashed with Argon2id. -* Sessions use secure, HttpOnly cookies with short TTL. -* All APIs require authentication via session cookie. -* Role-based access control is enforced on every endpoint. -* Input validation and escaping prevent SQL injection and XSS. -* CSRF protection is enabled for state-changing routes. -* Docker containers run as non-root users. -* No external network access is allowed unless explicitly whitelisted.