Skip to main content

System Requirements

Before installing Solarecliente, ensure your system meets the following requirements:

Node.js

Version 18.0 or higher required

Database

PostgreSQL 14+ or MySQL 8+

Memory

Minimum 4GB RAM recommended

Storage

At least 500MB free disk space

Installation Methods

Choose the installation method that best fits your needs:

Install via NPM

The recommended way to install Solarecliente is using npm:
# Clone the repository
git clone https://github.com/S0l4lr3/Solarecliente.git
cd solarecliente

# Install dependencies
npm install

# Build the application
npm run build
This method gives you full access to the source code and allows for customization.

Configuration

Environment Variables

Solarecliente uses environment variables for configuration. Create a .env.local file in the root directory:
# Application
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:3000/api
NODE_ENV=development

# Database
DATABASE_URL=postgresql://postgres:password@localhost:5432/solarecliente

# Authentication
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key-here

# Email (Optional)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-password

# File Storage (Optional)
S3_BUCKET=solarecliente-files
S3_REGION=us-east-1
S3_ACCESS_KEY=your-access-key
S3_SECRET_KEY=your-secret-key
Never commit your .env.local file to version control. Add it to .gitignore to keep your secrets safe.

Database Setup

1

Create Database

Create a new PostgreSQL or MySQL database:
CREATE DATABASE solarecliente;
2

Run Migrations

Apply the database schema:
npm run db:migrate
This will create all necessary tables and indexes.
3

Seed Initial Data (Optional)

Populate the database with sample data for testing:
npm run db:seed
This step is optional and only recommended for development environments.

Verifying Installation

After installation, verify everything is working correctly:

1. Check Application Status

npm run dev
Visit http://localhost:3000 and you should see the Solarecliente login page.

2. Run Health Check

curl http://localhost:3000/api/health
Expected response:
{
  "status": "healthy",
  "database": "connected",
  "version": "1.0.0"
}

3. Run Tests

npm run test
All tests should pass:
 Client API endpoints (4 tests)
 Authentication flow (3 tests)
 Database connections (2 tests)

Test Suites: 9 passed, 9 total
Tests: 47 passed, 47 total

Post-Installation Steps

1

Create Admin Account

Create your first admin user:
npm run create-admin
Follow the prompts to set up your admin credentials.
2

Configure Authentication

Set up your preferred authentication provider (OAuth, SAML, etc.) in the admin panel:Navigate to Settings > Authentication and configure your provider.
3

Customize Branding

Update the application branding to match your organization:
// config/branding.ts
export const branding = {
  companyName: 'Your Company',
  logo: '/images/your-logo.png',
  primaryColor: '#1a73e8',
  theme: 'light', // or 'dark'
};
4

Set Up Backups

Configure automated database backups:
npm run setup-backups
For production environments, we recommend daily automated backups with at least 30-day retention.

Troubleshooting

Common Issues

If port 3000 is already in use, you can change the port:
PORT=3001 npm run dev
Or update your .env.local file:
PORT=3001
Verify your database credentials and ensure the database server is running:
# For PostgreSQL
pg_isready -h localhost -p 5432

# Check your DATABASE_URL
echo $DATABASE_URL
Common fixes:
  • Ensure the database exists
  • Check username and password
  • Verify the database server is running
  • Check firewall rules
Clear node_modules and reinstall:
rm -rf node_modules
rm package-lock.json
npm install
If you encounter TypeScript or build errors:
# Clear Next.js cache
rm -rf .next

# Rebuild
npm run build

Updating Solarecliente

To update to the latest version:
# Pull latest changes
git pull origin main

# Install new dependencies
npm install

# Run any new migrations
npm run db:migrate

# Rebuild the application
npm run build

# Restart the server
npm run start
Always backup your database before updating to a new version.

Next Steps

Quickstart Guide

Follow our quickstart guide to create your first client

Configuration

Learn about advanced configuration options

API Reference

Explore the API documentation

Deployment

Deploy Solarecliente to production

Build docs developers (and LLMs) love