Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b11b8b2
feat(invoice): add Zod validation schemas for invoice CRUD operations
Levi-Ojukwu Jul 10, 2026
2167c44
feat(errors): add custom error classes for API error handling
Levi-Ojukwu Jul 10, 2026
021157e
feat(middleware): add global error handler middleware
Levi-Ojukwu Jul 10, 2026
9dde6aa
feat(middleware): add Zod validation middleware for request data
Levi-Ojukwu Jul 10, 2026
ea2b23a
feat(middleware): add JWT authentication and role-based authorization
Levi-Ojukwu Jul 10, 2026
29b6c0b
feat(invoice): implement invoice CRUD controller with role-based perm…
Levi-Ojukwu Jul 10, 2026
d6fa981
feat(invoice): add invoice API routes with auth and validation
Levi-Ojukwu Jul 10, 2026
1bfa7c0
feat(schema): add lineItems JSON field to Invoice model
Levi-Ojukwu Jul 10, 2026
4af1abe
feat(seed): add database seeding script with sample data
Levi-Ojukwu Jul 10, 2026
2a65f1e
feat(scripts): add database migration and management scripts
Levi-Ojukwu Jul 10, 2026
da365b1
feat(deps): add file upload and S3 dependencies
Levi-Ojukwu Jul 10, 2026
3c701d0
feat(upload): implement S3 file upload service with image resizing
Levi-Ojukwu Jul 10, 2026
81fc8a6
feat(upload): implement file upload controller endpoints
Levi-Ojukwu Jul 10, 2026
d5dbdaa
feat(upload): add file upload API routes
Levi-Ojukwu Jul 10, 2026
a4e2fe5
feat(config): add S3 configuration for file uploads
Levi-Ojukwu Jul 10, 2026
4f84a08
feat(env): add S3 environment variables to example config
Levi-Ojukwu Jul 10, 2026
97b9228
feat(server): wire up invoice and upload routes with error handling
Levi-Ojukwu Jul 10, 2026
581c808
ci: add GitHub Actions CI pipeline
Levi-Ojukwu Jul 10, 2026
50d297b
ci: add GitHub Actions deployment workflow
Levi-Ojukwu Jul 10, 2026
8d2da1f
fix(ci): add ESLint flat config with typescript-eslint
Levi-Ojukwu Jul 10, 2026
471979a
fix(deps): add typescript-eslint dev dependency
Levi-Ojukwu Jul 10, 2026
f7cb461
test: add unit tests for AppError, invoice schema, and upload validation
Levi-Ojukwu Jul 10, 2026
066b14b
fix(types): resolve TypeScript strict mode errors
Levi-Ojukwu Jul 10, 2026
7feb2e0
fix(ci): resolve dependency conflict and upgrade Node version
Levi-Ojukwu Jul 10, 2026
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
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ NODE_ENV="development"

# CORS
CORS_ORIGIN="http://localhost:3000"

# AWS S3 (for file uploads)
AWS_REGION="us-east-1"
AWS_S3_BUCKET="stellflow-uploads"
AWS_ACCESS_KEY_ID="your-aws-access-key"
AWS_SECRET_ACCESS_KEY="your-aws-secret-key"
# AWS_S3_ENDPOINT="http://localhost:9000"
# AWS_S3_FORCE_PATH_STYLE="true"
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

env:
NODE_VERSION: "22"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npm run lint

typecheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npx prisma generate
- run: npm run typecheck

test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: stellflow_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgresql://test:test@localhost:5432/stellflow_test
JWT_SECRET: test-secret
NODE_ENV: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npx prisma generate
- run: npx prisma migrate deploy
- run: npm test

build:
name: Build
runs-on: ubuntu-latest
needs: [lint, typecheck, test]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npx prisma generate
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
67 changes: 67 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Deploy

on:
push:
branches: [main]

env:
NODE_VERSION: "20"

jobs:
deploy-staging:
name: Deploy to Staging
runs-on: ubuntu-latest
environment: staging
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci --omit=dev
- run: npx prisma generate
- name: Run migrations
env:
DATABASE_URL: ${{ secrets.STAGING_DATABASE_URL }}
run: npx prisma migrate deploy
- name: Deploy
env:
DATABASE_URL: ${{ secrets.STAGING_DATABASE_URL }}
JWT_SECRET: ${{ secrets.STAGING_JWT_SECRET }}
STELLAR_NETWORK: testnet
NODE_ENV: staging
run: echo "Deploy to staging - configure your hosting provider"

deploy-production:
name: Deploy to Production
runs-on: ubuntu-latest
environment: production
needs: [deploy-staging]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci --omit=dev
- run: npx prisma generate
- name: Run migrations
env:
DATABASE_URL: ${{ secrets.PRODUCTION_DATABASE_URL }}
run: npx prisma migrate deploy
- name: Deploy
env:
DATABASE_URL: ${{ secrets.PRODUCTION_DATABASE_URL }}
JWT_SECRET: ${{ secrets.PRODUCTION_JWT_SECRET }}
STELLAR_NETWORK: public
NODE_ENV: production
run: echo "Deploy to production - configure your hosting provider"
17 changes: 17 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import js from "@eslint/js";
import tseslint from "typescript-eslint";

export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
{
ignores: ["dist/", "node_modules/", "coverage/"],
},
{
rules: {
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-namespace": "off",
},
}
);
Loading
Loading