Complete guide to installing and configuring PROVESA Web, the institutional web platform and administrative panel for PROVESA SCC (Sociedad Cooperativa de Consumo).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.
System Requirements
Required Software
- Node.js: Version 20 or higher
- Package Manager: pnpm v9+ (recommended) or npm
- Database: PostgreSQL 15 or higher (local or remote)
Optional Tools
- Git: For cloning the repository
- Database GUI: pgAdmin, TablePlus, or Drizzle Studio for database management
Installation Steps
Install dependencies
Install all required dependencies using your preferred package manager:This will install all dependencies listed in
package.json, including:- SvelteKit 5 - Application framework
- Drizzle ORM - Database toolkit
- Better Auth - Authentication system
- TailwindCSS 4 - Styling framework
- Nodemailer - Email sending
- Vitest & Playwright - Testing frameworks
Set up environment variables
Create your environment configuration file:Edit the
.env file with your specific configuration:.env
Configure the database
Apply the database schema to your PostgreSQL database:This command uses Drizzle Kit to synchronize your database schema with the definitions in
src/lib/server/db/schema.js.Seed the database
Run the seed scripts to create initial data:This will:
- Create an admin user with the credentials from your
.envfile - Set up the default theme configuration
Environment Variables Reference
Database Configuration
| Variable | Description | Example |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | postgres://user:password@localhost:5432/provesa |
The database URL format is:
postgres://username:password@host:port/database_nameApplication Settings
| Variable | Description | Example |
|---|---|---|
ORIGIN | Base URL of your application | http://localhost:5173 (development)https://provesa.com (production) |
Authentication
| Variable | Description | Required |
|---|---|---|
BETTER_AUTH_SECRET | 32-character secret for session encryption | Yes |
Email Configuration
| Variable | Description | Required |
|---|---|---|
GMAIL_USER | Gmail address for sending emails | Yes |
GMAIL_APP_PASSWORD | Gmail app-specific password | Yes |
To generate a Gmail App Password:
- Go to your Google Account settings
- Navigate to Security → 2-Step Verification
- Scroll to “App passwords”
- Generate a new app password for “Mail”
Admin User Seed
| Variable | Description | Default |
|---|---|---|
ADMIN_NAME | Display name for admin user | Administrador |
ADMIN_EMAIL | Admin login email | admin@provesa.com |
ADMIN_PASSWORD | Admin login password | (required) |
Available Scripts
PROVESA Web includes several npm scripts for different tasks:Development
Database Management
Production Build
Testing & Quality
Project Structure
Technology Stack
PROVESA Web is built with modern web technologies:| Technology | Purpose | Version |
|---|---|---|
| SvelteKit | Application framework | 5 |
| Svelte | UI framework with runes | 5 |
| TailwindCSS | Utility-first CSS framework | 4 |
| PostgreSQL | Relational database | 15+ |
| Drizzle ORM | TypeScript ORM | Latest |
| Better Auth | Authentication library | Latest |
| Nodemailer | Email sending (Gmail) | Latest |
| Vitest | Unit testing framework | Latest |
| Playwright | E2E testing framework | Latest |
Troubleshooting
Database Connection Issues
If you encounter database connection errors:- Verify PostgreSQL is running:
pg_isready - Check your
DATABASE_URLformat is correct - Ensure the database exists:
createdb provesa - Verify user permissions in PostgreSQL
Port Already in Use
If port 5173 is already in use:Missing Environment Variables
If you see errors about missing environment variables:- Ensure
.envfile exists in the project root - Verify all required variables are set
- Restart the development server after changing
.env
Gmail Authentication Errors
If password recovery emails fail to send:- Verify
GMAIL_USERandGMAIL_APP_PASSWORDare correct - Ensure you’re using an App Password, not your regular Gmail password
- Check that 2-Step Verification is enabled on your Google account
Next Steps
After installation, you can:- Access the admin panel at
/admin - Customize theme colors in the admin settings
- Manage candidates and suggestions
- Configure the public-facing website
- Set up production deployment
For production deployment, ensure you’ve configured proper environment variables, enabled HTTPS, and followed security best practices for your database and authentication secrets.
