chore: initial project setup with backend, frontend, CI/CD, and documentation
Add complete NexaFabric project structure including: - FastAPI backend with SQLAlchemy models, JWT auth, RBAC, audit logging, and provider interfaces - React + TypeScript frontend with Vite, Tailwind CSS, TanStack Query, and Zustand - Docker Compose configuration for PostgreSQL, Redis, API, worker, frontend, and nginx - GitHub Actions and GitLab CI workflows for testing, linting, building, and security scanning - Environment
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
- security
|
||||
- release
|
||||
|
||||
backend:
|
||||
image: python:3.12-slim
|
||||
stage: test
|
||||
script:
|
||||
- cd backend
|
||||
- pip install ".[dev]"
|
||||
- ruff check .
|
||||
- pytest
|
||||
|
||||
frontend:
|
||||
image: node:22-alpine
|
||||
stage: test
|
||||
script:
|
||||
- cd frontend
|
||||
- npm install
|
||||
- npm test
|
||||
- npm run build
|
||||
|
||||
docker-build:
|
||||
image: docker:27
|
||||
stage: build
|
||||
services:
|
||||
- docker:27-dind
|
||||
script:
|
||||
- docker build -t nexafabric-api:$CI_COMMIT_SHA backend
|
||||
- docker build -t nexafabric-frontend:$CI_COMMIT_SHA frontend
|
||||
|
||||
security-scan:
|
||||
image: aquasec/trivy:latest
|
||||
stage: security
|
||||
script:
|
||||
- trivy fs --exit-code 0 --severity HIGH,CRITICAL .
|
||||
|
||||
openapi:
|
||||
image: python:3.12-slim
|
||||
stage: release
|
||||
script:
|
||||
- cd backend
|
||||
- pip install ".[dev]"
|
||||
- python -c "import json; from app.main import app; print(json.dumps(app.openapi()))" > ../openapi.json
|
||||
artifacts:
|
||||
paths:
|
||||
- openapi.json
|
||||
|
||||
Reference in New Issue
Block a user