Skip to content

Commit 0c04b83

Browse files
YuvalYuval
authored andcommitted
refactor(docs): update project documentation and remove outdated files
1 parent 0d4fa89 commit 0c04b83

9 files changed

Lines changed: 289 additions & 342 deletions

File tree

01-Database/ResetData.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ DBCC CHECKIDENT ('city', RESEED, 0);
4444

4545
PRINT 'All user data cleared. Identity columns reset.';
4646
PRINT 'event_type rows preserved.';
47-
PRINT 'Run SeedDemoData.sql to re-populate demo data if needed.';
47+
PRINT 'Register a new user through the app to re-populate.';
4848
GO

03-Client/ATTRIBUTIONS.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

03-Client/README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

03-Client/clientFilesHere.txt

Whitespace-only changes.

03-Client/guidelines/Guidelines.md

Lines changed: 0 additions & 61 deletions
This file was deleted.

CLAUDE.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,28 @@
44

55
GroundShare is a Hebrew (RTL), mobile-first web app for urban planning transparency. Users view a map of their neighborhood, see official planning data (construction permits, road work, city plans from Tel Aviv GIS / iplan / mavat), and crowdsource community reports (noise, blockages, etc.). Features include address comparison, favorites, reviews, voting, and a gamification system (XP/streaks).
66

7+
## Deployment
8+
9+
Production is live on Azure (Israel Central):
10+
- Backend API: `https://app-groundshare-api.azurewebsites.net`
11+
- Frontend: Azure App Service (Node host serving the Vite `dist/` bundle)
12+
- Database: Azure SQL (`sql-groundshare-il.database.windows.net`)
13+
- Secrets: Azure Key Vault via Managed Identity — no secrets in env vars
14+
715
## Project structure
816

917
```
10-
01-Database/ SQL Server schema + seed data (GroundShareDB.sql, SeedDemoData.sql)
18+
01-Database/ SQL Server schema + stored procedures (GroundShareDB.sql)
19+
ResetData.sql — wipes user data while keeping schema + lookups
1120
02-Server/ C# ASP.NET Core 8 Web API
12-
Controllers/ 14 controllers (Auth, Users, Events, Geo, Locations, Favorites, etc.)
21+
Controllers/ 18 controllers (Auth, Users, Events, Geo, Locations, Favorites,
22+
Ai, Comments, Comparisons, Files, Health, Notifications, etc.)
1323
DAL/ Data access — pure ADO.NET, NO Entity Framework. All DB calls use
1424
SqlConnection + SqlCommand, mostly via stored procedures (sp_*)
1525
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
1629
03-Client/ React 18 + TypeScript + Vite
1730
src/app/
1831
components/ Screen components (MainScreen, CreateEventScreen, etc.)
@@ -31,8 +44,9 @@ reference/ Design specs: screen mockups (screens.pdf), workflow diagram
3144
## Running locally
3245

3346
```bash
34-
# Database: Run 01-Database/GroundShareDB.sql then SeedDemoData.sql in SSMS
35-
# Demo account: demo@groundshare.co.il / Demo1234!
47+
# Database: Run 01-Database/GroundShareDB.sql in SSMS against local SQL Express.
48+
# DB starts empty — register your first user through the app's Register screen.
49+
# To reset between tests: run 01-Database/ResetData.sql
3650

3751
# Backend (port 5227)
3852
cd 02-Server

README.md

Lines changed: 51 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,70 @@
1-
GroundShare - Master AI Development Prompt & README.md
2-
🎯 Project Overview
3-
GroundShare is a mobile application designed to bridge the gap between complex official urban planning data and local community knowledge. It provides a transparent, map-based interface that aggregates municipal data (GIS, planning documents, infrastructure work) and crowdsourced community reports. The app empowers renters, homeowners, and real estate investors to make informed decisions and track real-time changes in their neighborhoods.
1+
# GroundShare
42

5-
Target Language & UI: Strictly Hebrew (RTL - Right to Left).
6-
Target Device: Google Pixel 7 (Android), strictly Mobile.
3+
Hebrew (RTL), mobile-first web app for urban planning transparency in Israel.
4+
Users view a map of their neighborhood, see official municipal planning data
5+
(construction permits, road work, city plans from Tel Aviv GIS, iplan, and
6+
mavat), and crowdsource community reports (noise, blockages, etc.).
77

8-
🏗️ System Architecture & Tech Stack
9-
The project follows a strict 3-tier architecture.
8+
Features: address comparison, favorites, reviews, voting, notifications, and a
9+
gamification system (XP / streaks).
1010

11-
1. Client-Side (Frontend)
12-
Framework: React Native (Expo recommended for rapid development, or bare CLI if native modules demand it).
11+
## Live
1312

14-
State Management: Zustand or Redux Toolkit.
13+
- **Frontend**: hosted on Azure App Service (Israel Central)
14+
- **Backend API**: `https://app-groundshare-api.azurewebsites.net`
15+
- **Database**: Azure SQL Database (`sql-groundshare-il.database.windows.net`)
1516

16-
Navigation: React Navigation (Stack and Bottom Tabs).
17+
## Tech stack
1718

18-
Maps: react-native-maps (with custom markers and clustering).
19+
| Layer | Stack |
20+
|---|---|
21+
| Frontend | React 18, TypeScript, Vite, Tailwind CSS, React Router 7, `@vis.gl/react-google-maps` |
22+
| Mobile shell | Capacitor (iOS + Android) wrapping the Vite build |
23+
| Backend | ASP.NET Core 8 Web API (C#), pure ADO.NET (no EF Core), FluentValidation |
24+
| Database | Microsoft SQL Server with stored procedures |
25+
| Cloud | Azure App Service, Azure SQL, Azure Blob Storage, Azure Key Vault |
26+
| Auth | JWT (access 15min / refresh 14d with rotation), Google OAuth, BCrypt |
1927

20-
Styling: StyleSheet, styled-components, or NativeWind (Tailwind). Must strictly enforce RTL layout.
28+
## Project layout
2129

22-
2. Server-Side (Backend)
23-
Framework: C# with ASP.NET Core Web API (.NET 8+).
30+
```
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
37+
```
2438

25-
Architecture: Clean Architecture or N-Tier (Controllers, Services, Repositories).
39+
## Documentation
2640

27-
ORM: Entity Framework Core (for basic CRUD) & Dapper (for executing complex Stored Procedures).
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)
2845

29-
Scraping/Integration: HtmlAgilityPack or PuppeteerSharp for scraping external governmental sites.
46+
## Quick start
3047

31-
AI Integration: Integration with an LLM API (OpenAI/Gemini) for the "Smart Comparison" text generation.
48+
```bash
49+
# Database: run 01-Database/GroundShareDB.sql in SSMS against local SQL Express
3250

33-
3. Database
34-
Engine: Microsoft SQL Server. or firebase more likly to the active app
51+
# Backend (port 5227)
52+
cd 02-Server && dotnet run
3553

36-
Structure: Relational tables based on the provided ERD, utilizing explicit Primary/Foreign Keys.
54+
# Frontend (port 5173)
55+
cd 03-Client && npm install && npm run dev
56+
```
3757

38-
Logic: Heavy use of Stored Procedures for complex queries (e.g., calculating the GroundShareScore, geospatial proximity searches).
58+
Backend requires `02-Server/appsettings.Development.json` (gitignored) with local
59+
SQL connection string, JWT key, and Google Maps API key. See
60+
[SETUP.md](SETUP.md) for the full config template.
3961

40-
📂 Directory Structure
41-
The workspace must be organized exactly into these three root folders:
62+
## Security
4263

43-
Plaintext
44-
/GroundShare_Project
45-
46-
├── /Client # React Native application
47-
│ ├── /src
48-
│ │ ├── /assets # Images, fonts
49-
│ │ ├── /components # Reusable UI components (Buttons, Inputs, Modals)
50-
│ │ ├── /screens # Page-level components (Login, Map, Report, Compare)
51-
│ │ ├── /navigation # React Navigation setup
52-
│ │ ├── /services # Axios API calls
53-
│ │ ├── /store # State management
54-
│ │ └── /utils # Helpers, constants, RTL config
55-
56-
├── /Server # C# .NET Web API
57-
│ ├── /Controllers
58-
│ ├── /Models # DTOs and Entities
59-
│ ├── /Services # Business Logic, Scraping Services
60-
│ ├── /Data # DbContext, Repositories
61-
│ └── /Integrations # External API handlers (LLM, Gov APIs)
62-
63-
└── /Database # SQL Scripts
64-
├── /Tables # CREATE TABLE scripts
65-
├── /Procedures # CREATE PROCEDURE scripts (e.g., CalculateScore)
66-
└── /SeedData # Mock data for testing
67-
⚙️ Core Business Logic & Features
68-
1. Map & Data Aggregation
69-
Official Data Integration:
64+
- All secrets live in Azure Key Vault in production (Managed Identity, no env vars)
65+
- Pre-commit hook runs `gitleaks protect --staged` to block accidental commits
66+
- Dependabot + CI scan every PR for vulnerable dependencies
7067

71-
Tel Aviv GIS: Scrape/pull data regarding infrastructure work. [Reference URL provided in prompt].
68+
## License
7269

73-
Mavat (מנהל התכנון): Scrape Israeli planning documents. Use the Meirim open-source project as an architectural reference for parsing this complex data.
74-
75-
GovMap/Gov API: Use Israeli government APIs for address autocomplete.
76-
77-
Community Reports (Crowdsourcing): Users can report issues (noise, blockages) with images and coordinates.
78-
79-
2. The Smart Element: "GroundShareScore" (AI Comparison)
80-
Users can compare up to 3 addresses.
81-
82-
The system calculates a score (0-100) based on 3 vectors: Official Planning (GIS/Mavat), Community Reports, and User Reviews.
83-
84-
AI LLM Integration: The backend must send these raw calculated metrics to an LLM to generate a natural, conversational Hebrew summary explaining the pros, cons, and warnings for each address.
85-
86-
3. Specific Business Rules (Strict Constraints)
87-
Report Lifecycle: A community event expires after 3 days. The system must prompt the creator to verify if it's still active; otherwise, status changes to "Expired".
88-
89-
Verification: An event receives a "Verified" badge (Blue Tick) only after 5 different users confirm it.
90-
91-
Security: Passwords must be hashed. The frontend MUST NOT hold any external API keys (Mavat, OpenAI, GIS). All 3rd party integrations must route through the C# Server. Use JWT for authentication.
92-
93-
🚀 Execution Instructions for the AI
94-
Phase 1 Focus: The React Native Client
95-
As per the human developer's request, initiate development with the Client folder.
96-
97-
Initialize: Set up the React Native project with RTL (Hebrew) support enabled.
98-
99-
Navigation: Scaffold the navigation map based on A4 Screens WorkFlow.jpg (Auth Stack -> Main Bottom Tabs: Search/Map, Favorites, Add Report, Comparison, Personal Area).
100-
101-
Screens Development: Begin drafting the UI components exactly as shown in screens.pdf (Login/Registration, Map View with bottom sheets, Event Creation Form, AI Comparison Dashboard).
102-
103-
Mocking: Create a mockData.ts file to simulate backend responses so the UI can be built and tested completely independently of the server.
104-
105-
Implied Modern Best Practices to Enforce:
106-
Frontend Security: Use .env variables for the internal API base URL. Do not expose sensitive endpoints.
107-
108-
Error Handling: Implement global error boundaries in React Native and a global exception middleware in the .NET API.
109-
110-
Geospatial Data: Ensure the map uses standard lat/lng coordinates and standardizes them before sending them to the backend. The SQL Server should eventually use geography spatial data types for radius-based queries.
111-
112-
Performance: Optimize map rendering so clustering is used when hundreds of community reports or GIS points are loaded.
70+
Private project. All rights reserved.

0 commit comments

Comments
 (0)