Migrate all repos into monorepo context folders
Bahn: aisupport, Analyse-O2C-C2S, awesome-bahn-mcp-servers, beam-mcp,
Confluence_Bot, db-planet-mcp-server, O2C-Harness, project-audit,
Projekt-KIQ-HP, teamlandkarte-mcp
Dhive: Jury-Voting
Privat: CV, NoteGraph (NOTE: NoteGraph needs complete redo after consolidation)
Shared: AI-Orchestrator, OrgMyLife, power_skills_and_more
Shared/references: symphony (read-only)
Bahn repos remain available as independent remotes - this monorepo
pulls them in via subtree, the originals are untouched.
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
# Projekt-KIQ HP
|
||||
|
||||
React + Vite single-page application for Projekt-KIQ, with an Express backend for auth and access request management.
|
||||
|
||||
## Local Development
|
||||
|
||||
Copy the `.env.example` file to create your local environment configuration:
|
||||
|
||||
```bash
|
||||
cp .env.example .env.local
|
||||
```
|
||||
|
||||
Fill in the backend credentials (`ADMIN_USER`, `ADMIN_PASSWORD`, `SESSION_SECRET`).
|
||||
|
||||
### Running locally
|
||||
|
||||
```bash
|
||||
npm install
|
||||
|
||||
# Start the Express backend (port 3003)
|
||||
npm run start:server
|
||||
|
||||
# In another terminal, start the Vite dev server
|
||||
npm run dev
|
||||
```
|
||||
|
||||
The frontend dev server proxies API requests to `http://localhost:3003` (configured via `VITE_API_URL` in `.env.local`).
|
||||
|
||||
## Architecture
|
||||
|
||||
- **Frontend**: React + Vite SPA (static build)
|
||||
- **Backend**: Express.js (session-based auth, JSON file storage for access requests, Nodemailer for email alerts)
|
||||
- **Auth**: Cookie-based sessions (`kiq_session`), single admin user configured via env vars
|
||||
- **Access Requests**: Stored in `server/data/access-requests.json`, email alerts sent via SMTP
|
||||
|
||||
## Production Build
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
This repository deploys to `projekt-kiq.d-hive.de` via GitHub Actions.
|
||||
|
||||
- The built frontend is deployed to `/opt/projekt-kiq/site`
|
||||
- The Express backend runs as a systemd service (`projekt-kiq.service`) on port 3003
|
||||
- Caddy reverse-proxies `/api/*` to the backend and serves the SPA for all other routes
|
||||
- The [`Caddyfile`](./Caddyfile) handles TLS termination, security headers, and routing
|
||||
- The workflow in [`.github/workflows/deploy.yml`](./.github/workflows/deploy.yml) builds, deploys frontend + backend, and restarts services
|
||||
|
||||
### One-time server setup
|
||||
|
||||
- Install the SSH public key for the `github-deploy` user in `/home/github-deploy/.ssh/authorized_keys`
|
||||
- Ensure `/opt/projekt-kiq/` is writable by `github-deploy`
|
||||
- Create `/opt/projekt-kiq/.env` with production credentials (see `.env.example`)
|
||||
- Allow `github-deploy` to run the required sudo commands (see deploy workflow)
|
||||
|
||||
### Required GitHub secrets
|
||||
|
||||
- `DEPLOY_SSH_KEY`: private key for the `github-deploy` user
|
||||
|
||||
## Environment Variables
|
||||
|
||||
See [`.env.example`](./.env.example) for all available configuration options.
|
||||
Reference in New Issue
Block a user