Skip to content

Commit 4d36b04

Browse files
YuvalYuval
authored andcommitted
refactor: reorganize project into src/, docs/, tools/ layout
- src/01-database/ ← 01-Database/ - src/02-server/ ← 02-Server/ - src/03-client/ ← 03-Client/ - docs/ ← CLAUDE.md, DEPLOY.md, SECURITY.md, SETUP.md - tools/ ← scripts/ Updated all path references in: .gitignore, .gitleaks.toml, .github/workflows/ci.yml, .github/workflows/cd.yml, .github/dependabot.yml, README.md, docs/*.md, and TypeScript source comments. Backend and frontend builds verified clean.
1 parent 866b67c commit 4d36b04

338 files changed

Lines changed: 187 additions & 181 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.

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version: 2
99
updates:
1010
# Frontend (React + Vite + TypeScript)
1111
- package-ecosystem: "npm"
12-
directory: "/03-Client"
12+
directory: "/src/03-client"
1313
schedule:
1414
interval: "weekly"
1515
day: "monday"
@@ -33,7 +33,7 @@ updates:
3333

3434
# Backend (ASP.NET Core 8 + ADO.NET)
3535
- package-ecosystem: "nuget"
36-
directory: "/02-Server"
36+
directory: "/src/02-server"
3737
schedule:
3838
interval: "weekly"
3939
day: "monday"

.github/workflows/cd.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
runs-on: ubuntu-latest
4343
defaults:
4444
run:
45-
working-directory: 02-Server
45+
working-directory: src/02-server
4646

4747
steps:
4848
- uses: actions/checkout@v4
@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
app-name: app-groundshare-api
7777
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
78-
package: 02-Server/deploy-linux.zip
78+
package: src/02-server/deploy-linux.zip
7979

8080
- name: Health check
8181
run: |
@@ -104,14 +104,14 @@ jobs:
104104
with:
105105
node-version: "20"
106106
cache: "npm"
107-
cache-dependency-path: 03-Client/package-lock.json
107+
cache-dependency-path: src/03-client/package-lock.json
108108

109109
- name: Install dependencies
110-
working-directory: 03-Client
110+
working-directory: src/03-client
111111
run: npm ci
112112

113113
- name: Build
114-
working-directory: 03-Client
114+
working-directory: src/03-client
115115
run: npm run build
116116
env:
117117
VITE_API_BASE_URL: https://app-groundshare-api.azurewebsites.net/api
@@ -124,7 +124,7 @@ jobs:
124124
# Doing it this way removes the need to set a Startup Command in the
125125
# Portal — the zip is self-describing.
126126
- name: Package dist
127-
working-directory: 03-Client
127+
working-directory: src/03-client
128128
run: |
129129
cp -r dist deploy-frontend
130130
cat > deploy-frontend/package.json <<'JSON'
@@ -145,7 +145,7 @@ jobs:
145145
with:
146146
app-name: app-groundshare-web
147147
publish-profile: ${{ secrets.AZURE_WEBAPP_FRONTEND_PUBLISH_PROFILE }}
148-
package: 03-Client/deploy-frontend.zip
148+
package: src/03-client/deploy-frontend.zip
149149

150150
# First-time Oryx build + pm2 warmup on a cold Free-tier App Service
151151
# can take 2-3 minutes. Poll for up to ~4 minutes before failing.

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
defaults:
2929
run:
30-
working-directory: 02-Server
30+
working-directory: src/02-server
3131

3232
steps:
3333
- uses: actions/checkout@v4
@@ -54,7 +54,7 @@ jobs:
5454
runs-on: ubuntu-latest
5555
defaults:
5656
run:
57-
working-directory: 03-Client
57+
working-directory: src/03-client
5858

5959
steps:
6060
- uses: actions/checkout@v4
@@ -63,7 +63,7 @@ jobs:
6363
with:
6464
node-version: "20"
6565
cache: "npm"
66-
cache-dependency-path: 03-Client/package-lock.json
66+
cache-dependency-path: src/03-client/package-lock.json
6767

6868
- name: Install dependencies
6969
run: npm ci

.gitignore

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
# Build outputs
2-
02-Server/bin/
3-
02-Server/obj/
4-
02-Server/publish/
5-
02-Server/publish-linux/
6-
02-Server/deploy.zip
7-
02-Server/deploy-linux.zip
2+
src/02-server/bin/
3+
src/02-server/obj/
4+
src/02-server/publish/
5+
src/02-server/publish-linux/
6+
src/02-server/deploy.zip
7+
src/02-server/deploy-linux.zip
88

99
# Node modules
10-
03-Client/node_modules/
10+
src/03-client/node_modules/
1111
**/node_modules/
1212

1313
# Build output
14-
03-Client/dist/
14+
src/03-client/dist/
1515

1616
# Capacitor native build artifacts (keep source, ignore generated)
17-
03-Client/android/.gradle/
18-
03-Client/android/build/
19-
03-Client/android/app/build/
20-
03-Client/android/app/src/main/assets/public/
21-
03-Client/android/app/src/main/assets/capacitor.config.json
22-
03-Client/android/app/src/main/assets/capacitor.plugins.json
23-
03-Client/android/local.properties
24-
03-Client/android/captures/
25-
03-Client/android/.idea/
26-
03-Client/ios/App/Pods/
27-
03-Client/ios/App/build/
28-
03-Client/ios/App/App/public/
29-
03-Client/ios/App/App/capacitor.config.json
30-
03-Client/ios/App/App/config.xml
31-
03-Client/ios/DerivedData/
32-
03-Client/ios/App/App.xcworkspace/xcuserdata/
33-
03-Client/ios/App/App.xcodeproj/xcuserdata/
17+
src/03-client/android/.gradle/
18+
src/03-client/android/build/
19+
src/03-client/android/app/build/
20+
src/03-client/android/app/src/main/assets/public/
21+
src/03-client/android/app/src/main/assets/capacitor.config.json
22+
src/03-client/android/app/src/main/assets/capacitor.plugins.json
23+
src/03-client/android/local.properties
24+
src/03-client/android/captures/
25+
src/03-client/android/.idea/
26+
src/03-client/ios/App/Pods/
27+
src/03-client/ios/App/build/
28+
src/03-client/ios/App/App/public/
29+
src/03-client/ios/App/App/capacitor.config.json
30+
src/03-client/ios/App/App/config.xml
31+
src/03-client/ios/DerivedData/
32+
src/03-client/ios/App/App.xcworkspace/xcuserdata/
33+
src/03-client/ios/App/App.xcodeproj/xcuserdata/
3434

3535
# Environment / secrets
3636
.claude
@@ -55,11 +55,13 @@ Thumbs.db
5555
*.log
5656

5757
# Uploaded files (local dev storage)
58-
02-Server/wwwroot/uploads/
58+
src/02-server/wwwroot/uploads/
5959

6060
# Misc
6161
reference
6262
secrets
63+
# Legacy folder — tracked files moved to src/02-server/; bin/ remains locked on Windows
64+
02-Server/
6365

6466
# Local-only security docs (contain sensitive incident details / rotation checklists)
6567
SECURITY_INCIDENT.md

.gitleaks.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ title = "GroundShare gitleaks config"
88
# documented, non-secret key that ships with the Azure Storage emulator.
99
# See: https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite
1010
paths = [
11-
'''02-Server/Services/AzureBlobStorageService\.cs'''
11+
'''src/02-server/Services/AzureBlobStorageService\.cs'''
1212
]

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,35 @@ gamification system (XP / streaks).
2828
## Project layout
2929

3030
```
31-
01-Database/ SQL schema + stored procedures (GroundShareDB.sql)
32-
02-Server/ ASP.NET Core 8 Web API (Controllers / DAL / BL / Services)
33-
03-Client/ React + Vite frontend + Capacitor native shell
34-
reference/ Design specs, screen mockups, Hebrew spec docs
35-
scripts/ Git hooks (gitleaks pre-commit)
36-
.github/ CI/CD workflows
31+
.github/ CI/CD workflows
32+
docs/ Setup, deploy, security, and AI context docs
33+
src/
34+
01-database/ SQL schema + stored procedures (GroundShareDB.sql)
35+
02-server/ ASP.NET Core 8 Web API (Controllers / DAL / BL / Services)
36+
03-client/ React + Vite frontend + Capacitor native shell
37+
tools/ Git hooks (gitleaks pre-commit)
3738
```
3839

3940
## Documentation
4041

41-
- [SETUP.md](SETUP.md) — local development environment setup
42-
- [DEPLOY.md](DEPLOY.md) — Azure deployment guide
43-
- [SECURITY.md](SECURITY.md) — security architecture and policy
44-
- [CLAUDE.md](CLAUDE.md) — AI assistant context (architecture patterns, conventions)
42+
- [docs/SETUP.md](docs/SETUP.md) — local development environment setup
43+
- [docs/DEPLOY.md](docs/DEPLOY.md) — Azure deployment guide
44+
- [docs/SECURITY.md](docs/SECURITY.md) — security architecture and policy
45+
- [docs/CLAUDE.md](docs/CLAUDE.md) — AI assistant context (architecture patterns, conventions)
4546

4647
## Quick start
4748

4849
```bash
49-
# Database: run 01-Database/GroundShareDB.sql in SSMS against local SQL Express
50+
# Database: run src/01-database/GroundShareDB.sql in SSMS against local SQL Express
5051

5152
# Backend (port 5227)
52-
cd 02-Server && dotnet run
53+
cd src/02-server && dotnet run
5354

5455
# Frontend (port 5173)
55-
cd 03-Client && npm install && npm run dev
56+
cd src/03-client && npm install && npm run dev
5657
```
5758

58-
Backend requires `02-Server/appsettings.Development.json` (gitignored) with local
59+
Backend requires `src/02-server/appsettings.Development.json` (gitignored) with local
5960
SQL connection string, JWT key, and Google Maps API key. See
6061
[SETUP.md](SETUP.md) for the full config template.
6162

CLAUDE.md renamed to docs/CLAUDE.md

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,45 +15,48 @@ Production is live on Azure (Israel Central):
1515
## Project structure
1616

1717
```
18-
01-Database/ GroundShareDB.sql — complete schema + stored procedures (single source of truth)
18+
.github/ CI/CD workflows
19+
docs/ Setup, deploy, security, and AI context docs (this file)
20+
src/
21+
01-database/ GroundShareDB.sql — complete schema + stored procedures (single source of truth)
1922
ResetData.sql — wipes user data while keeping schema + lookups
20-
02-Server/ C# ASP.NET Core 8 Web API
21-
Controllers/ 18 controllers (Auth, Users, Events, Geo, Locations, Favorites,
23+
02-server/ C# ASP.NET Core 8 Web API
24+
Controllers/ 18 controllers (Auth, Users, Events, Geo, Locations, Favorites,
2225
Ai, Comments, Comparisons, Files, Health, Notifications, etc.)
23-
DAL/ Data access — pure ADO.NET, NO Entity Framework. All DB calls use
26+
DAL/ Data access — pure ADO.NET, NO Entity Framework. All DB calls use
2427
SqlConnection + SqlCommand, mostly via stored procedures (sp_*)
25-
BL/ Request/response DTOs (LoginRequest, CreateEventRequest, User, etc.)
26-
Services/ Business logic (auth, storage, AI, rate limiting)
27-
Middleware/ Exception handling, security headers, request logging
28-
Validators/ FluentValidation rules for request DTOs
29-
03-Client/ React 18 + TypeScript + Vite
30-
src/app/
31-
components/ Screen components (MainScreen, CreateEventScreen, etc.)
32-
shared/ Reusable UI (BottomNavBar, TopSearchBar, MapLayout, DrawerMenu, etc.)
33-
address-search/ AddressInfoPanel, EventCard, ReviewSection, icons, types
34-
context/ AuthContext (JWT + user state), MapContext (map config + overlays)
35-
hooks/ useGeolocation, useGoogleMapsKey, useSwipeBack
36-
services/ api.ts (all backend calls), addressAutocomplete.ts (data.gov.il)
37-
routes.ts React Router 7 — route definitions with ProtectedRoute/GuestRoute guards
38-
src/styles/ tailwind.css, theme.css (CSS variables), fonts.css (Heebo, Poppins)
39-
src/assets/ Logo and map mockup images
40-
src/imports/ SVG icon path exports
41-
reference/ Design specs: screen mockups (screens.pdf), workflow diagram, Hebrew spec doc
28+
BL/ Request/response DTOs (LoginRequest, CreateEventRequest, User, etc.)
29+
Services/ Business logic (auth, storage, AI, rate limiting)
30+
Middleware/ Exception handling, security headers, request logging
31+
Validators/ FluentValidation rules for request DTOs
32+
03-client/ React 18 + TypeScript + Vite
33+
src/app/
34+
components/ Screen components (MainScreen, CreateEventScreen, etc.)
35+
shared/ Reusable UI (BottomNavBar, TopSearchBar, MapLayout, DrawerMenu, etc.)
36+
address-search/ AddressInfoPanel, EventCard, ReviewSection, icons, types
37+
context/ AuthContext (JWT + user state), MapContext (map config + overlays)
38+
hooks/ useGeolocation, useGoogleMapsKey, useSwipeBack
39+
services/ api.ts (all backend calls), addressAutocomplete.ts (data.gov.il)
40+
routes.ts React Router 7 — route definitions with ProtectedRoute/GuestRoute guards
41+
src/styles/ tailwind.css, theme.css (CSS variables), fonts.css (Heebo, Poppins)
42+
src/assets/ Logo and map mockup images
43+
src/imports/ SVG icon path exports
44+
tools/ Pre-commit hook for gitleaks
4245
```
4346

4447
## Running locally
4548

4649
```bash
47-
# Database: Run 01-Database/GroundShareDB.sql in SSMS against local SQL Express.
50+
# Database: Run src/01-database/GroundShareDB.sql in SSMS against local SQL Express.
4851
# DB starts empty — register your first user through the app's Register screen.
49-
# To reset between tests: run 01-Database/ResetData.sql
52+
# To reset between tests: run src/01-database/ResetData.sql
5053

5154
# Backend (port 5227)
52-
cd 02-Server
55+
cd src/02-server
5356
dotnet run
5457

5558
# Frontend (port 5173)
56-
cd 03-Client
59+
cd src/03-client
5760
npm install
5861
npm run dev
5962
```
@@ -167,7 +170,7 @@ POST /api/comparisons Save comparison
167170

168171
## Database rules (MANDATORY)
169172

170-
`01-Database/GroundShareDB.sql` is the **single source of truth** for the entire schema.
173+
`src/01-database/GroundShareDB.sql` is the **single source of truth** for the entire schema.
171174

172175
- **Never create migration files.** All schema changes (new tables, new SPs, modified SPs, new indexes) go directly into `GroundShareDB.sql`.
173176
- Every table uses `IF OBJECT_ID(...) IS NULL CREATE TABLE ...` so the file is safe to re-run on existing databases.
@@ -180,7 +183,7 @@ POST /api/comparisons Save comparison
180183

181184
## Adding a full-stack feature (checklist)
182185

183-
1. **Database**: Add table/SP directly in `01-Database/GroundShareDB.sql`, run in SSMS
186+
1. **Database**: Add table/SP directly in `src/01-database/GroundShareDB.sql`, run in SSMS
184187
2. **DAL**: Create `XxxDAL.cs` inheriting `DBServices`, call SP with `CreateSP()`
185188
3. **DTO**: Add request/response models in `BL/`
186189
4. **Controller**: Create `XxxController.cs` with `[Route("api/xxx")]`, inject DAL

DEPLOY.md renamed to docs/DEPLOY.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Write-Host "Key Vault: https://$KEYVAULT_NAME.vault.azure.net"
196196
- Password: (the one you set above)
197197
- Database: `GroundShareDB`
198198

199-
2. Open `01-Database/GroundShareDB.sql` and execute it. This creates all tables and stored procedures.
199+
2. Open `src/01-database/GroundShareDB.sql` and execute it. This creates all tables and stored procedures.
200200

201201
3. **Do NOT run SeedDemoData.sql** — production starts empty. The first user is created via the live `/register` endpoint.
202202

@@ -306,7 +306,7 @@ az webapp config appsettings set `
306306
### Every deploy:
307307

308308
```powershell
309-
cd C:\Users\Yuval\source\repos\Ovalvoi\GroundShare\02-Server
309+
cd C:\Users\Yuval\source\repos\Ovalvoi\GroundShare\src\02-server
310310
311311
# 1. Clean old artifacts so stale files don't leak into the zip
312312
Remove-Item -Recurse -Force ./publish, ./publish-linux, ./deploy.zip, ./deploy-linux.zip -ErrorAction SilentlyContinue
@@ -356,7 +356,7 @@ az webapp deployment list-publishing-profiles `
356356

357357
### Install Capacitor:
358358
```powershell
359-
cd 03-Client
359+
cd src/03-client
360360
361361
npm install @capacitor/core @capacitor/cli
362362
npx cap init "GroundShare" "com.groundshare.app" --web-dir dist
@@ -366,7 +366,7 @@ npm install @capacitor/ios @capacitor/android
366366

367367
### Configure API URL:
368368

369-
Create or update `03-Client/capacitor.config.ts`:
369+
Create or update `src/03-client/capacitor.config.ts`:
370370
```typescript
371371
import type { CapacitorConfig } from '@capacitor/cli';
372372

File renamed without changes.

0 commit comments

Comments
 (0)