Skip to content

Commit fc5a5d0

Browse files
Admin portal/panel (#7)
Co-authored-by: veekshitha Nelluru <177645260+Veekshitha11@users.noreply.github.com>
1 parent 500685b commit fc5a5d0

82 files changed

Lines changed: 9985 additions & 525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 30 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,40 @@ dalgo/
3131
│ ├── docker-compose.yml ← production
3232
│ └── docker-compose.dev.yml ← local dev
3333
└── scripts/
34-
└── sync.sh ← pull latest from individual repos (transition period)
34+
├── install-hooks.sh ← run once after cloning to install git hooks
35+
└── hooks/pre-commit ← the hook (black + prettier + eslint on staged files)
3536
```
3637

3738
---
3839

40+
## Contributing
41+
42+
### One-time setup after cloning
43+
44+
```bash
45+
./scripts/install-hooks.sh
46+
```
47+
48+
This installs a git pre-commit hook that runs automatically on every `git commit`:
49+
50+
| Service | Tool | Behaviour |
51+
|---|---|---|
52+
| `backend/` | black | auto-formats and re-stages |
53+
| `prefect-proxy/` | black | auto-formats and re-stages |
54+
| `webapp/` | prettier | auto-formats and re-stages |
55+
| `webapp/` | eslint | check only — fix errors manually |
56+
57+
**Auto-formatting:** black and prettier rewrite files in place and re-stage them, so your commit always lands clean. If prettier or black reformats something, just re-run `git commit` — the second attempt will pass.
58+
59+
**ESLint errors:** fix them manually, then commit again. Warnings are also blocked (`--max-warnings=0`) to stay in sync with CI.
60+
61+
### Requirements
62+
63+
- `uv` — for backend/prefect-proxy black ([install](https://docs.astral.sh/uv/getting-started/installation/))
64+
- `node` + `npm` — for webapp prettier/eslint (node_modules must be installed: `cd webapp && npm install`)
65+
66+
---
67+
3968
## Docker setup
4069

4170
All compose commands run from the `docker/` directory.
@@ -81,72 +110,6 @@ docker compose -f docker-compose.dev.yml up -d --no-deps backend
81110

82111
---
83112

84-
## Updating service code (transition period)
85-
86-
Two scripts handle keeping the monorepo in sync with the individual repos while they're still active.
87-
88-
### `scripts/bootstrap.sh` — full re-import with complete git history
89-
90-
Rebuilds the monorepo from scratch: clones all four repos, rewrites their history into the correct subdirectory paths, merges them together, and commits the monorepo Docker infra on top.
91-
92-
```bash
93-
# Rebuild locally
94-
./scripts/bootstrap.sh
95-
96-
# Rebuild and force-push to origin/main in one step
97-
./scripts/bootstrap.sh --push
98-
```
99-
100-
After a `--push`, teammates sync with:
101-
```bash
102-
git fetch --force && git reset --hard origin/main
103-
```
104-
105-
**When to use:** when you want the monorepo to fully reflect the latest commits (and history) from all individual repos — e.g. before archiving the individual repos, or after a batch of changes has landed across multiple services.
106-
107-
**Requires:** `brew install git-filter-repo`
108-
109-
---
110-
111-
### `scripts/sync.sh` — lightweight code sync (no history rewrite)
112-
113-
Pulls the latest code from each repo via rsync. Faster than bootstrap — caches clones in `.sync-cache/` so subsequent runs only fetch new commits. Does **not** touch `docker/`.
114-
115-
```bash
116-
# Sync all services
117-
./scripts/sync.sh
118-
119-
# Sync one service
120-
./scripts/sync.sh backend
121-
122-
# Review what changed, then commit
123-
git diff --stat
124-
git add -A && git commit -m "sync: $(date +%Y-%m-%d)"
125-
```
126-
127-
**When to use:** for routine day-to-day syncing between bootstraps — pulls latest code and `.env` files without rewriting history.
128-
129-
---
130-
131-
### Which to use when
132-
133-
| Scenario | Script |
134-
|---|---|
135-
| Catch up on a batch of changes, preserve per-commit history | `bootstrap.sh --push` |
136-
| Quick pull of latest code between bootstraps | `sync.sh` |
137-
| Final sync before archiving individual repos | `bootstrap.sh --push` |
138-
139-
### Source repo → monorepo directory mapping
140-
141-
| Source repo | Monorepo dir |
142-
|---|---|
143-
| `DalgoT4D/DDP_backend` | `backend/` |
144-
| `DalgoT4D/webapp_v2` | `webapp/` |
145-
| `DalgoT4D/prefect-proxy` | `prefect-proxy/` |
146-
| `DalgoT4D/ai-llm-service` | `ai-llm-service/` |
147-
148-
---
149-
150113
## Adding / changing Docker config
151114

152115
All Dockerfiles and compose files live in `docker/`. Changes here do not affect the individual repos.

0 commit comments

Comments
 (0)