feat: implement report submission with photo upload and map display

- Fix Prisma client generation and database schema sync issues
- Implement user auto-creation from Clerk authentication
- Add raw SQL queries to handle MySQL POINT spatial fields
- Make password_hash optional for Clerk-only authentication
- Update MapPage to fetch real reports from API
- Add photo display in map popups with full-size modal view
- Configure CORS and Helmet for cross-origin image loading
- Add cleanup tracking task to implementation plan

Fixes report submission 500 errors and enables end-to-end workflow from submission to map display.
This commit is contained in:
2025-11-16 20:01:26 +00:00
parent a58e8da0e1
commit 64fe312f01
7 changed files with 180 additions and 39 deletions

View File

@@ -12,7 +12,10 @@ const app = express();
const PORT = process.env.PORT || 3005;
// Middleware
app.use(helmet());
app.use(helmet({
crossOriginResourcePolicy: { policy: "cross-origin" },
contentSecurityPolicy: false, // Disable CSP for development
}));
app.use(cors({
origin: process.env.CORS_ORIGIN || 'http://localhost:5173',
credentials: true,