Skip to content

Commit 54a0650

Browse files
committed
docs(website): add Docusaurus documentation site
Scaffold a Docusaurus site under website/ with custom landing page, branding, and documentation across getting-started, guides, concepts, reference, and community sections.
1 parent 1f5113a commit 54a0650

43 files changed

Lines changed: 25264 additions & 0 deletions

Some content is hidden

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

website/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

website/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```bash
8+
yarn
9+
```
10+
11+
## Local Development
12+
13+
```bash
14+
yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```bash
22+
yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
## Deployment
28+
29+
Using SSH:
30+
31+
```bash
32+
USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```bash
38+
GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Changelog
3+
sidebar_position: 5
4+
description: Release history and upgrade notes.
5+
---
6+
7+
# Changelog
8+
9+
All notable changes to VisitRomagna are documented here. Versions follow [Semantic Versioning](https://semver.org/)`MAJOR.MINOR.PATCH`.
10+
11+
While VisitRomagna is pre-1.0 (`0.x`), minor versions may include breaking changes; check the upgrade notes for each release.
12+
13+
## Unreleased
14+
15+
### Added
16+
17+
- Public Docusaurus documentation site under `website/`.
18+
- Mermaid architecture and lifecycle diagrams.
19+
- Comparison page versus Airbnb, Booking.com, GetYourGuide, and Agriturismo.it.
20+
21+
### Changed
22+
23+
- Improved `BookingService.confirm` to be idempotent on Stripe webhook replay.
24+
25+
### Fixed
26+
27+
- N/A.
28+
29+
## 0.1.0 — Initial public release
30+
31+
The first publicly visible commit. Includes:
32+
33+
- **Experience catalog** with six categories and rich filtering.
34+
- **Booking engine** with availability calendars and a full status lifecycle (`pending_payment``confirmed``completed``refunded` / `cancelled` / `disputed`).
35+
- **Stripe Connect** marketplace payments with simulated fallback.
36+
- **Italian VAT (IVA)** computation per category and **FatturaPA XML** invoicing.
37+
- **Host dashboard** for listings, calendar, pricing rules, bookings, payouts, messages, and reviews.
38+
- **Cycling module** with GPX routes, Strava OAuth, and Komoot deep-links.
39+
- **AI itinerary builder** with map-based browsing and multi-stop checkout.
40+
- **Real-time messaging** via Server-Sent Events.
41+
- **CRM & loyalty** — segments, tiers (Bronze/Silver/Gold), referrals, gift cards.
42+
- **B2B portal** for travel agents and group bookings.
43+
- **Admin console** with moderation, disputes, feature flags, and A/B experiments.
44+
- **Five locales** — IT, EN, DE, FR, ES with hreflang SEO.
45+
- **Vitest** suite with coverage thresholds enforced in CI.
46+
47+
## Upgrade notes
48+
49+
### Coming from 0.0.x prototypes
50+
51+
- The data model now uses Prisma 7 with `cuid()` primary keys. If you had hand-rolled fixtures, regenerate them via `npm run db:seed`.
52+
- The `payments.ts` module replaces the older `pricing.ts`. Import sites changed; run `npm run lint` to surface broken imports.
53+
54+
### Conventions going forward
55+
56+
- Conventional Commits drive this changelog (see [Contributing](./contributing)).
57+
- Each release tag triggers a CI build and a deployment to the demo environment.
58+
- We squash-merge PRs; squashed commit message becomes the changelog entry.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Code of Conduct
3+
sidebar_position: 4
4+
description: How we treat each other in this community.
5+
---
6+
7+
# Code of Conduct
8+
9+
## Our pledge
10+
11+
We — contributors and maintainers — pledge to make participation in VisitRomagna a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
12+
13+
## Our standards
14+
15+
Examples of behavior that contributes to a positive environment:
16+
17+
- Using welcoming and inclusive language.
18+
- Being respectful of differing viewpoints and experiences.
19+
- Gracefully accepting constructive criticism.
20+
- Focusing on what is best for the community.
21+
- Showing empathy towards other community members.
22+
23+
Examples of unacceptable behavior:
24+
25+
- Trolling, insulting/derogatory comments, and personal or political attacks.
26+
- Public or private harassment.
27+
- Publishing others' private information, such as a physical or electronic address, without explicit permission.
28+
- Conduct which could reasonably be considered inappropriate in a professional setting.
29+
30+
## Our responsibilities
31+
32+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
33+
34+
Maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct.
35+
36+
## Scope
37+
38+
This Code of Conduct applies within all project spaces, and also applies when an individual is representing the project or its community in public spaces. Representation includes using an official project email, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39+
40+
## Enforcement
41+
42+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening a private issue or contacting the maintainers directly via the contact channels listed in the repository. All complaints will be reviewed and investigated promptly and fairly.
43+
44+
Maintainers are obligated to respect the privacy and security of the reporter of any incident.
45+
46+
## Attribution
47+
48+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: Contributing
3+
sidebar_position: 3
4+
description: How to file issues, propose changes, and ship pull requests.
5+
---
6+
7+
# Contributing
8+
9+
VisitRomagna is built in the open. Contributions of every size are welcome — typo fixes, new test cases, whole features.
10+
11+
## Before you start
12+
13+
1. **Open an issue first** for anything bigger than a typo. Describe the problem, the proposed fix, and any open questions. This avoids duplicated work and dead-end PRs.
14+
2. **Search existing issues** — your idea may already be in motion.
15+
3. **Read the [Code of Conduct](./code-of-conduct)**.
16+
17+
## Local setup
18+
19+
Follow the [Quickstart](../getting-started/quickstart) — Node 20+, `npm install`, `cp .env.example .env`, `npx prisma generate`, `npm run dev`.
20+
21+
Run the full CI check before pushing:
22+
23+
```bash
24+
make ci
25+
```
26+
27+
That's lint + typecheck + tests + production build.
28+
29+
## Branching
30+
31+
We use trunk-based development against `main`.
32+
33+
```
34+
feature/<short-kebab-name> # new functionality
35+
fix/<short-kebab-name> # bug fixes
36+
docs/<short-kebab-name> # docs only
37+
```
38+
39+
Examples: `feature/group-booking-discount`, `fix/sse-reconnect-loop`, `docs/payments-iva-rates`.
40+
41+
## Commits
42+
43+
We follow Conventional Commits:
44+
45+
```
46+
feat: add group booking discount engine
47+
fix(payments): correct IVA rounding on €0 bookings
48+
docs: clarify Stripe webhook setup
49+
test(booking): cover same-day cancellation policy
50+
chore(deps): bump prisma to 7.8.1
51+
```
52+
53+
Why this matters: the changelog and release notes are generated from commit messages.
54+
55+
## Pull requests
56+
57+
A great PR is:
58+
59+
- **Small.** < 400 lines diff is the target. If yours is bigger, consider splitting.
60+
- **Test-covered.** New behavior ⇒ new tests. Bug fixes ⇒ a regression test.
61+
- **Self-explaining.** A reviewer should understand *why* from the description, not just *what*.
62+
- **Green on CI.** Don't ask for review with red checks.
63+
64+
PR template (auto-applied by GitHub):
65+
66+
```markdown
67+
## What
68+
One sentence on what changes.
69+
70+
## Why
71+
The user-facing or technical reason.
72+
73+
## How
74+
Notable design choices.
75+
76+
## Test plan
77+
- [ ] Unit tests added
78+
- [ ] Manual smoke test:
79+
- [ ] CI green
80+
```
81+
82+
## Coding style
83+
84+
- **TypeScript strict.** No `any`. If you must, justify in a comment.
85+
- **No dead code.** Delete it; git remembers.
86+
- **Prefer pure functions** in `src/lib/`. Side effects belong in domain services or subscribers.
87+
- **Error handling is structured.** Throw typed errors (`InvalidStateError`, `NotFoundError`) — the API serializer maps them to status codes.
88+
- **Comments explain *why*.** The code already shows *what*.
89+
90+
## Reviewing
91+
92+
If you're reviewing someone else's PR:
93+
94+
- **Run it locally.** "LGTM" without running the change isn't a review.
95+
- **Test the edge cases.** Empty inputs, max sizes, concurrent requests.
96+
- **Be kind and specific.** "This could be clearer" → "Consider extracting the IVA logic into a helper named `calculateIva(category, amount)` so the test names read more naturally."
97+
98+
## Release process
99+
100+
Releases ship from `main` whenever we have a meaningful batch of changes. The release commit:
101+
102+
1. Bumps `package.json` version.
103+
2. Regenerates the [Changelog](./changelog).
104+
3. Tags `v0.x.y` and pushes.
105+
4. CI builds and deploys to the demo environment.
106+
107+
## Hall of fame
108+
109+
Significant contributors get a permanent line in the README and a `CREDITS.md` mention. Thank you for shipping with us.
110+
111+
## Questions
112+
113+
Open a [Discussion](https://github.com/ForliLabs/visit-romagna/discussions). For private inquiries, the maintainers are reachable through the repository's contact info.

0 commit comments

Comments
 (0)