Skip to content

Commit b67a123

Browse files
add review service layer and extract Joi schemas for modular validation
1 parent 9a09a5a commit b67a123

58 files changed

Lines changed: 368 additions & 584 deletions

Some content is hidden

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

β€Žclient/README.mdβ€Ž

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,14 @@ An interactive web platform showcasing cultural landmarks in Chemnitz, Germany,
5252
### DevOps
5353
| Technology | Purpose |
5454
|------------|---------|
55-
| Docker | Containerization |
5655
| GitHub | Git |
57-
| Git | Error Monitoring |
5856

5957
## πŸš€ Getting Started
6058

6159
### Prerequisites
6260
- Node.js 18+
6361
- PostgreSQL 14+ with PostGIS extension
6462
- Mapbox API key
65-
- Overpass API endpoint
6663

6764
### Installation
6865

@@ -90,13 +87,13 @@ pnpm dev
9087
# or
9188
bun dev
9289
```
93-
90+
Create Database in postgreSQL then
9491
bash
9592
# Run migrations
96-
npm run db:migrate
93+
npm run migrate
9794

9895
# Seed initial data
99-
npm run db:seed
96+
npm run seed
10097
Running the Application
10198
Development Mode
10299

@@ -130,13 +127,12 @@ Endpoint Method Description Auth Required
130127
/sites/search GET Search with filters No
131128
/favorites POST Add favorite Yes
132129
/itineraries POST Create route Yes
130+
// Add review of place
133131
View Complete API Documentation β†’
134132

135133
πŸ”’ Security Features
136134
JWT Authentication
137135

138-
Role-based access control
139-
140136
Data encryption at rest
141137

142138
Automated security headers

β€Žserver/Dockerfileβ€Ž

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

β€Žserver/README.mdβ€Ž

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# 🌍 Chemnitz Cultural Explorer
2+
3+
[![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0-blue)](https://nodejs.org/)
4+
[![PostgreSQL Version](https://img.shields.io/badge/postgresql-%3E%3D14.0-blue)](https://www.postgresql.org/)
5+
6+
![App Preview](public/images/app-preview.gif)
7+
8+
An interactive web platform showcasing cultural landmarks in Chemnitz, Germany, powered by open data sources with personalized touring features.
9+
10+
## ✨ Key Features
11+
12+
### πŸ—ΊοΈ Exploration Tools
13+
- Interactive map with 150+ cultural sites
14+
- Custom categories: Museums, Theaters, Public Art, Historic Sites
15+
- Real-time filtering by:
16+
- Distance from current location
17+
- Categories
18+
- Keyword based search
19+
20+
### πŸ‘€ User Experience
21+
- **Personalized Accounts**:
22+
- Display places data on mapbox
23+
- Save favorite locations
24+
- Create User account
25+
- List of favorite sites
26+
- Display details of saved sites and sites
27+
28+
### πŸš€ Technical Highlights
29+
- Offline-first PWA support
30+
- Optimized routing algorithms
31+
- Accessibility compliant (WCAG 2.1 AA)
32+
33+
## πŸ› οΈ Technology Stack
34+
35+
### Frontend
36+
| Technology | Version | Purpose |
37+
|------------|---------|---------|
38+
| Next.js 15 | React Framework |
39+
| Mapbox GL JS | Interactive Maps |
40+
| Tailwind CSS | Utility-first CSS |
41+
| React Query | Data Fetching |
42+
43+
### Backend
44+
| Technology | Version | Purpose |
45+
|------------|---------|---------|
46+
| Node.js | Runtime |
47+
| Express | API Server |
48+
| PostgreSQL | Database |
49+
| PostGIS | Geospatial Queries |
50+
| Prisma | ORM |
51+
52+
### DevOps
53+
| Technology | Purpose |
54+
|------------|---------|
55+
| GitHub | Git |
56+
57+
## πŸš€ Getting Started
58+
59+
### Prerequisites
60+
- Node.js 18+
61+
- PostgreSQL 14+ with PostGIS extension
62+
- Mapbox API key
63+
64+
### Installation
65+
66+
1. **Clone the repository**
67+
```bash
68+
git clone https://github.com/Syed-Bilal-Haider-Engineer/chemnitz-culture
69+
cd chemnitz-culture
70+
cd client
71+
cd server
72+
Set up environment variables
73+
74+
bash
75+
cp .env.example .env.local
76+
# Edit the file with your credentials
77+
Install dependencies
78+
79+
First, run the development server:
80+
81+
```bash
82+
npm run dev
83+
# or
84+
yarn dev
85+
# or
86+
pnpm dev
87+
# or
88+
bun dev
89+
```
90+
91+
bash
92+
Create database in postgreSQL and then
93+
# Run migrations
94+
npm run migrate
95+
96+
# Seed initial data
97+
npm run seed
98+
Running the Application
99+
Development Mode
100+
101+
bash
102+
npm run dev
103+
Production Build
104+
105+
bash
106+
npm run build
107+
npm start
108+
πŸ“‚ Project Structure
109+
text
110+
.
111+
β”œβ”€β”€ app/ # Next.js app router
112+
β”‚ β”œβ”€β”€ (auth)/ # Authentication routes
113+
β”‚ β”œβ”€β”€ (_lib) # API routes
114+
β”œβ”€β”€ components/ # Reusable components
115+
β”‚ β”œβ”€β”€ layout/ # Layouts
116+
β”‚ └── common/ # Reuseabliity
117+
118+
β”œβ”€β”€ public/ # Static assets
119+
β”œβ”€β”€ styles/ # Global styles
120+
└── types/ # TypeScript definitions
121+
🌐 API Documentation
122+
Base URL
123+
https://api.chemnitz-culture.com/v1
124+
125+
Key Endpoints
126+
Endpoint Method Description Auth Required
127+
/sites GET List all cultural sites No
128+
/sites/search GET Search with filters No
129+
/favorites POST Add favorite Yes
130+
/itineraries POST Create route Yes
131+
// Add review of place
132+
View Complete API Documentation β†’
133+
134+
πŸ”’ Security Features
135+
JWT Authentication
136+
137+
Data encryption at rest
138+
139+
Automated security headers
140+
141+
🚴 Performance
142+
Metric Value Target
143+
LCP 1.2s <2.5s
144+
TTI 1.8s <3.5s
145+
Bundle Size 145kB <200kB
146+
πŸ“± Offline Support
147+
Service Worker caching (Workbox)
148+
149+
Localstorage for local data
150+
151+
Background sync for updates

β€Žserver/docker-compose.ymlβ€Ž

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

β€Žserver/prisma/migrations/20250604180542_all_places_feature/migration.sqlβ€Ž

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

β€Žserver/prisma/migrations/20250604184640_update_feature_modal/migration.sqlβ€Ž

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

β€Žserver/prisma/migrations/20250604190021_add_user_property/migration.sqlβ€Ž

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

β€Žserver/prisma/migrations/20250604191752_update_user_role/migration.sqlβ€Ž

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

0 commit comments

Comments
Β (0)