NEW LANDING PAGE: - Full-screen responsive design for phone and desktop - Three main sections: About, Accommodation, Community - About section explains site purpose and customer connection - Accommodation section promotes Pensiunea Buongusto Sibiu - Community section showcases Stories & Tracks features COMMUNITY SYSTEM: - Complete login/register system with email, password, nickname - Password recovery functionality via email - Post creation template with all required features: * Title and subtitle fields * Rich text content area * Photo upload with descriptions * GPX file upload capability * 1-5 difficulty rating system * Preview mode before publishing - GPX map preview component (placeholder for Leaflet integration) ADMIN PANEL: - Comprehensive admin dashboard - User management (view, activate/deactivate users) - Post management (approve, edit, delete posts) - Frontend management (edit homepage, site settings) - Backend management (database, security, logs) - Statistics and analytics overview TECHNICAL INFRASTRUCTURE: - Prisma database schema with complete data models - Environment configuration template - Additional dependencies for email and authentication - Proper component structure and organization - Mobile-responsive design throughout FEATURES IMPLEMENTED: ✅ Full-screen landing page with 3 sections ✅ Pensiunea Buongusto promotion section ✅ Community Stories & Tracks area ✅ Email/password/nickname authentication ✅ Password recovery system ✅ Complete post creation template ✅ Photo upload with descriptions ✅ GPX file upload ✅ Difficulty rating (1-5 stars) ✅ Admin panel for frontend/backend management ✅ Database schema and models ✅ Mobile and desktop responsive design Ready for database setup and authentication implementation.
145 lines
3.5 KiB
Plaintext
145 lines
3.5 KiB
Plaintext
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model Account {
|
|
id String @id @default(cuid())
|
|
userId String
|
|
type String
|
|
provider String
|
|
providerAccountId String
|
|
refresh_token String? @db.Text
|
|
access_token String? @db.Text
|
|
expires_at Int?
|
|
token_type String?
|
|
scope String?
|
|
id_token String? @db.Text
|
|
session_state String?
|
|
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
@@unique([provider, providerAccountId])
|
|
}
|
|
|
|
model Session {
|
|
id String @id @default(cuid())
|
|
sessionToken String @unique
|
|
userId String
|
|
expires DateTime
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
nickname String @unique
|
|
email String @unique
|
|
emailVerified DateTime?
|
|
image String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
isActive Boolean @default(true)
|
|
isAdmin Boolean @default(false)
|
|
|
|
accounts Account[]
|
|
sessions Session[]
|
|
posts Post[]
|
|
comments Comment[]
|
|
likes Like[]
|
|
|
|
@@map("users")
|
|
}
|
|
|
|
model VerificationToken {
|
|
identifier String
|
|
token String @unique
|
|
expires DateTime
|
|
|
|
@@unique([identifier, token])
|
|
}
|
|
|
|
model Post {
|
|
id String @id @default(cuid())
|
|
title String
|
|
subtitle String?
|
|
content String @db.Text
|
|
difficulty Int @default(3) // 1-5 scale
|
|
published Boolean @default(false)
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
authorId String
|
|
author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
|
|
|
|
images PostImage[]
|
|
gpxFiles GPXFile[]
|
|
comments Comment[]
|
|
likes Like[]
|
|
|
|
@@map("posts")
|
|
}
|
|
|
|
model PostImage {
|
|
id String @id @default(cuid())
|
|
filename String
|
|
originalName String
|
|
description String?
|
|
size Int
|
|
mimeType String
|
|
createdAt DateTime @default(now())
|
|
|
|
postId String
|
|
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
|
|
@@map("post_images")
|
|
}
|
|
|
|
model GPXFile {
|
|
id String @id @default(cuid())
|
|
filename String
|
|
originalName String
|
|
size Int
|
|
createdAt DateTime @default(now())
|
|
|
|
postId String
|
|
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
|
|
@@map("gpx_files")
|
|
}
|
|
|
|
model Comment {
|
|
id String @id @default(cuid())
|
|
content String @db.Text
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
authorId String
|
|
author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
|
|
|
|
postId String
|
|
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
|
|
@@map("comments")
|
|
}
|
|
|
|
model Like {
|
|
id String @id @default(cuid())
|
|
createdAt DateTime @default(now())
|
|
|
|
userId String
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
postId String
|
|
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
|
|
@@unique([userId, postId])
|
|
@@map("likes")
|
|
}
|