feat: initial commit — HermesMessages SaaS platform
Backend (FastAPI + Python 3.12):
- Multi-tenant auth with JWT: login, register, refresh, Meta OAuth
- Business & BusinessConfig management
- WhatsApp webhook with HMAC signature verification
- Bot engine powered by Claude AI
- Calendar availability with Redis caching
- Reservations CRUD with status management
- Dashboard analytics (stats, agenda, peak hours)
- Billing & plan management
- Admin panel with platform-wide stats
- Async bcrypt via asyncio.to_thread
- IntegrityError handling for concurrent registration race conditions
Frontend (React 18 + Vite + Tailwind CSS):
- Multi-step guided registration form with helper text on every field
- Login page with show/hide password toggle
- Protected routes with AuthContext
- Dashboard with stats cards, bar chart, and daily agenda
- Reservations list with search, filters, and inline status actions
- Calendar with weekly view, slot availability, and date blocking
- Config page: business info, schedules, bot personality
- Billing page with plan comparison and usage bar
Design system:
- Bricolage Grotesque + DM Sans typography
- Emerald primary palette with semantic color tokens
- scale(0.97) button press feedback, ease-out animations
- Skeleton loaders, stagger animations, prefers-reduced-motion support
- Accessible: aria-labels, visible focus rings, 4.5:1 contrast
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 09:49:41 -05:00
|
|
|
from sqlalchemy import Column, Date, Enum, ForeignKey, Integer, String, Time, func
|
|
|
|
|
from sqlalchemy.orm import relationship
|
|
|
|
|
|
|
|
|
|
from app.core.database import Base
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Reservation(Base):
|
|
|
|
|
__tablename__ = "reservations"
|
|
|
|
|
|
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
|
|
|
business_id = Column(Integer, ForeignKey("businesses.id", ondelete="CASCADE"), nullable=False)
|
|
|
|
|
client_name = Column(String, nullable=False)
|
|
|
|
|
client_phone = Column(String, nullable=False)
|
|
|
|
|
date = Column(Date, nullable=False, index=True)
|
|
|
|
|
time_start = Column(Time, nullable=False)
|
|
|
|
|
time_end = Column(Time, nullable=False)
|
|
|
|
|
party_size = Column(Integer, nullable=False, default=1)
|
|
|
|
|
status = Column(
|
|
|
|
|
Enum("pending", "confirmed", "cancelled", "no_show", name="reservation_status"),
|
|
|
|
|
nullable=False,
|
|
|
|
|
default="pending",
|
|
|
|
|
)
|
|
|
|
|
source = Column(
|
|
|
|
|
Enum("whatsapp", "manual", name="reservation_source"),
|
|
|
|
|
nullable=False,
|
|
|
|
|
default="manual",
|
|
|
|
|
)
|
|
|
|
|
notes = Column(String, nullable=True)
|
2026-04-29 09:39:56 -05:00
|
|
|
table_type_id = Column(Integer, ForeignKey("table_types.id", ondelete="SET NULL"), nullable=True)
|
feat: initial commit — HermesMessages SaaS platform
Backend (FastAPI + Python 3.12):
- Multi-tenant auth with JWT: login, register, refresh, Meta OAuth
- Business & BusinessConfig management
- WhatsApp webhook with HMAC signature verification
- Bot engine powered by Claude AI
- Calendar availability with Redis caching
- Reservations CRUD with status management
- Dashboard analytics (stats, agenda, peak hours)
- Billing & plan management
- Admin panel with platform-wide stats
- Async bcrypt via asyncio.to_thread
- IntegrityError handling for concurrent registration race conditions
Frontend (React 18 + Vite + Tailwind CSS):
- Multi-step guided registration form with helper text on every field
- Login page with show/hide password toggle
- Protected routes with AuthContext
- Dashboard with stats cards, bar chart, and daily agenda
- Reservations list with search, filters, and inline status actions
- Calendar with weekly view, slot availability, and date blocking
- Config page: business info, schedules, bot personality
- Billing page with plan comparison and usage bar
Design system:
- Bricolage Grotesque + DM Sans typography
- Emerald primary palette with semantic color tokens
- scale(0.97) button press feedback, ease-out animations
- Skeleton loaders, stagger animations, prefers-reduced-motion support
- Accessible: aria-labels, visible focus rings, 4.5:1 contrast
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 09:49:41 -05:00
|
|
|
created_at = Column(Date, server_default=func.current_date())
|
|
|
|
|
|
|
|
|
|
business = relationship("Business", back_populates="reservations")
|
2026-04-29 09:39:56 -05:00
|
|
|
table_type = relationship("TableType")
|