Skip to content

ForliLabs/visit-romagna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

125 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🇮🇹 VisitRomagna

Agritourism booking platform for Romagna, Italy — connecting travelers with authentic wine tastings, cooking classes, agriturismos, cycling tours, and cultural experiences across the Forlì–Cesena hills.

Built with Next.js 16, React 19, Prisma 7, and Tailwind CSS 4.

Prenota agriturismi, degustazioni, corsi di cucina e avventure autentiche tra Forlì, Bertinoro e le colline romagnole.


✨ Feature Highlights

Domain Key Features
Experiences Catalog with 6 categories, search/filter, experience detail pages, featured listings
Booking Engine Real-time availability, multi-guest booking, status lifecycle (pending → confirmed → completed)
Payments Stripe integration (simulated + live), IVA tax engine, platform commission split, FatturaPA XML
Host Dashboard Listings management, calendar/availability, analytics, media uploads, pricing rules, channels
Cycling Routes with GPX data, difficulty levels, Strava/Komoot integration, cycling challenges
Itineraries AI-powered trip builder, drag-and-drop planner, shareable itineraries, multi-stop checkout
Messaging Guest–host conversations, real-time SSE notifications, notification center
CRM & Loyalty Guest segmentation, loyalty tiers (bronze/silver/gold), referral codes, gift cards
Campaigns Seasonal content engine, festival/sagra listings, QR placement network
B2B & Groups Corporate/wedding group bookings, travel agent portal, B2B proposals
Admin Moderation queue, dispute resolution, platform analytics, feature flags, A/B experiments
Observability Domain event bus, structured logging, incident tracking, safety ratings
i18n 5 locales (IT, EN, DE, FR, ES), locale-aware routing, SEO hreflang tags
Moonshots Experimental features portfolio (destination graph, concierge OS, mobility cloud)

70+ features across 60+ API endpoints and 45+ pages.


🚀 Quick Start

Prerequisites

  • Node.js ≥ 20
  • npm ≥ 10

Setup

# Clone and install
git clone <repository-url>
cd visit-romagna
npm install

# Configure environment
cp .env.example .env

# Generate Prisma client
npx prisma generate

# Start development server
npm run dev

Open http://localhost:3000.

Environment Variables

Variable Required Description
DATABASE_URL Yes SQLite (file:./dev.db) or PostgreSQL connection
NEXT_PUBLIC_BASE_URL Yes Public app URL (default: http://localhost:3000)
STRIPE_SECRET_KEY No Stripe API key — leave empty for simulated payments
STRIPE_WEBHOOK_SECRET No Stripe webhook signing secret
REDIS_URL No Redis URL for multi-instance SSE pub/sub
AUTH_SECRET No Session cookie signing secret
STRAVA_CLIENT_ID No Strava OAuth app credentials

Tip: The app runs fully in simulated mode with no external services configured. Stripe payments, Strava integration, and Redis are gracefully stubbed.


📦 Scripts

Command Description
npm run dev Start Next.js dev server
npm run build Production build
npm run start Start production server
npm run lint ESLint checks
npm run test Run Vitest test suite
npm run test:watch Vitest in watch mode
npm run test:coverage Test coverage report
make ci Full CI pipeline: lint → typecheck → test → build

🏗️ Project Structure

visit-romagna/
├── prisma/
│   └── schema.prisma          # Data model (25+ models)
├── src/
│   ├── app/                   # Next.js App Router
│   │   ├── api/               # 60+ REST API routes
│   │   ├── admin/             # Admin panel pages
│   │   ├── dashboard/         # Host dashboard pages
│   │   ├── experiences/       # Experience catalog & detail
│   │   ├── booking/           # Booking flow
│   │   ├── cycling/           # Cycling routes hub
│   │   ├── itinerary/         # Trip planner
│   │   ├── moonshots/         # Experimental features
│   │   └── ...                # 35+ more route groups
│   ├── components/            # Shared UI components
│   │   ├── ui.tsx             # Base design system primitives
│   │   ├── navbar.tsx         # Global navigation
│   │   ├── footer.tsx         # Site footer
│   │   ├── hero.tsx           # Hero section
│   │   └── ...
│   └── lib/                   # Core business logic
│       ├── data.ts            # In-memory data layer + seed data
│       ├── db.ts              # Generic InMemoryStore abstraction
│       ├── auth.ts            # Cookie-based authentication
│       ├── auth-middleware.ts # RBAC middleware for API routes
│       ├── api-utils.ts       # Validation, rate limiting, errors
│       ├── payments.ts        # Stripe + IVA + FatturaPA
│       ├── realtime.ts        # SSE real-time communication
│       ├── hooks.ts           # Shared React hooks
│       ├── design-tokens.ts   # UI design system tokens
│       ├── domains/           # Domain services (booking, user, etc.)
│       ├── events/            # Domain event bus + subscribers
│       ├── repositories/      # Repository pattern abstractions
│       ├── types/             # TypeScript type definitions
│       └── i18n/              # Internationalization
├── tests/                     # Vitest test suite
├── docker-compose.yml         # Docker dev environment
├── Makefile                   # Development shortcuts
└── docs/                      # Documentation
    ├── API.md                 # API reference
    └── ARCHITECTURE.md        # Architecture overview

🛠️ Tech Stack

Layer Technology
Framework Next.js 16 (App Router)
Language TypeScript 5
UI React 19, Tailwind CSS 4, Lucide icons
Database Prisma 7 (SQLite dev / PostgreSQL prod)
Validation Zod 4
Payments Stripe (with simulated fallback)
Testing Vitest, Testing Library
Real-time Server-Sent Events (SSE)
Deployment Docker, Vercel-compatible

🐳 Docker

# Start full stack (app + PostgreSQL + Redis)
docker compose up -d

# View logs
docker compose logs -f app

# Stop
docker compose down

📚 Documentation


🧪 Testing

npm run test              # Run all tests
npm run test:watch        # Watch mode
npm run test:coverage     # Coverage report

Test suite covers:

  • API validation schemas (Zod)
  • Domain event bus (pub/sub, persistence)
  • Payment calculations (IVA, commission splits)
  • Design system tokens and variant mapping

📄 License

Source code is publicly available. No open-source license has been selected yet.

About

Tourism and experiences platform for Romagna itineraries, visitors, and local operators.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages