Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ashcroft08/provesa-web/llms.txt
Use this file to discover all available pages before exploring further.
Overview
PROVESA Web uses PostgreSQL as its database with Drizzle ORM for type-safe queries. The schema is organized into modular files by domain. Location:/src/lib/server/db/schemas/
Authentication Tables
user
User accounts and profile information.
Primary key, auto-generated UUID
User’s display name
Unique email address
Whether email has been verified
Profile image URL
Account creation timestamp
Last update timestamp (auto-updated)
- One-to-many with
session - One-to-many with
account
email(unique)
session
Active user sessions for authentication.
Primary key, session ID
Session expiration time
Unique session token (indexed)
Session creation time
Last session activity
Client IP address
Client user agent string
Foreign key to
user.id (CASCADE delete)userId(for faster lookups)token(unique)
account
OAuth providers and credential storage.
Primary key
Provider-specific account ID
Provider name (e.g., ‘google’, ‘credentials’)
Foreign key to
user.id (CASCADE delete)OAuth access token
OAuth refresh token
OAuth ID token
Access token expiration
Refresh token expiration
OAuth scopes granted
Hashed password (for credential provider)
Account link creation time
Last update time
userId
verification
Email verification and password reset tokens.
Primary key
Email or user identifier (indexed)
Verification token
Token expiration time
Token creation time
Last update time
identifier
Content Management Tables
hero_slides
Homepage hero banner slides.
Primary key, auto-increment
Cloudinary image URL
Main slide title
Highlighted text portion
Slide description/subtitle
Small badge text (e.g., “Nuevo”)
Text alignment: ‘left’, ‘center’, or ‘right’
CSS class for highlight color
Display order (lower = first)
Creation timestamp
products
Product catalog for homepage sections.
Primary key, auto-increment
Product name
Product description
Array of image URLs:
string[]Array of features:
{ title: string, desc: string, icon: string }[]Array of categories:
{ num: string, name: string, desc: string }[]Layout alignment: ‘left’ or ‘right’
Accent color: ‘primary’ or ‘accent’
Display mode: ‘features’ or ‘categories’
Display order
Creation timestamp
nosotros_config
Homepage “About Us” teaser section configuration (singleton).
Primary key (only 1 row should exist)
Section badge text
Main title
Highlighted portion of title
Section description
Call-to-action button text
CTA button link
Color scheme:
{ bg, accent, textMain, textMuted, iconColor, statBg }Statistics array:
{ number: string, label: string }[]Last update time
nosotros_page
Full “About Us” page content (singleton).
Primary key
Hero section badge
Hero section title
Hero section description
History section title
Array of history paragraphs:
string[]History section image URL
Mission section title
Mission statement
Vision section title
Vision statement
Photo gallery URLs:
string[]Last update time
User-Generated Content Tables
sugerencias
Customer suggestions and feedback.
Primary key, auto-generated UUID
Suggestion type (e.g., ‘Reclamo’, ‘Sugerencia’)
Customer name (optional, can be anonymous)
Suggestion message
Whether admin has marked as read
Submission timestamp
sugerencias_config
Configuration for suggestion form options (singleton).
Primary key
Array of suggestion types:
string[]Last update time
postulaciones
Job applications from career page.
Primary key, auto-generated UUID
Applicant name
Phone number
Email address
Branch/location applied to
Cloudinary URL of uploaded CV/resume
Optional cover letter message
Application submission time
empleo_sucursales
Available job locations/branches.
Primary key
Branch name
Whether branch is currently hiring
Creation timestamp
Contest Tables
concursos
Active and past contests/giveaways.
Primary key
Contest title
Highlighted portion of title
Contest description
Cloudinary image URL
Badge text (e.g., ‘Activo’, ‘Finalizado’)
Human-readable close date (e.g., ‘31 de Diciembre’)
Prize description
Call-to-action text
Legal disclaimer or terms
Whether contest is currently active (only one should be active)
Display order
Creation timestamp
concursos_ganadores
Contest winners and testimonials.
Primary key
Foreign key to
concursos.id (CASCADE delete)Winner’s name
Prize won
Winner’s testimonial/quote
Winner’s photo URL
Date label (e.g., ‘Diciembre 2024’)
Display order
Creation timestamp
- Many-to-one with
concursos(optional, can be null)
Configuration Tables
footer_info
Company information for footer (singleton).
Primary key
Company description
Main office address
Phone number
Mobile number
Contact email
Facebook profile URL
Instagram profile URL
TikTok profile URL
WhatsApp contact URL
Last update time
footer_branches
Branch locations displayed in footer.
Primary key
Branch name
Branch address
Display order
Creation timestamp
legal_pages
Editable legal pages (privacy policy, terms, etc.).
Primary key
URL slug (unique, e.g., ‘privacidad’, ‘terminos’)
Page title
Page content (HTML or markdown)
Last update time
slug(unique)
site_config
Key-value configuration storage.
Primary key
Config key (unique, e.g., ‘logo_url’)
Config value
key(unique)
theme_config
Theme color configuration (singleton).
Primary key
Primary brand color (hex)
Secondary brand color (hex)
Accent color (hex)
Background color (hex)
Last update time
Note: The theme service actually manages colors in a CSS file (
src/routes/layout.css) rather than this database table in the current implementation.Database Relationships
Entity Relationship Diagram
Schema Management
Adding New Tables
- Create schema file in
/src/lib/server/db/schemas/:
- Export in
/src/lib/server/db/schema.js:
- Push to database:
Migrations
Drizzle Kit generates migrations automatically:Next Steps
- Services & Repositories - How to query these tables
- Architecture Overview - Overall system design
- Project Structure - File organization
