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.
Install via Yarn If you prefer Yarn as your package manager: # Clone the repository
git clone https://github.com/S0l4lr3/Solarecliente.git
cd solarecliente
# Install dependencies
yarn install
# Build the application
yarn build
Install via Docker Use Docker for a containerized deployment: # Pull the official image
docker pull solarecliente/app:latest
# Run the container
docker run -p 3000:3000 \
-e DATABASE_URL="postgresql://user:pass@db:5432/solarecliente" \
-e NEXT_PUBLIC_API_URL="https://api.yourdomain.com" \
solarecliente/app:latest
Or use Docker Compose: version : '3.8'
services :
app :
image : solarecliente/app:latest
ports :
- "3000:3000"
environment :
- DATABASE_URL=postgresql://postgres:password@db:5432/solarecliente
- NEXT_PUBLIC_API_URL=http://localhost:3000/api
depends_on :
- db
db :
image : postgres:14
environment :
- POSTGRES_DB=solarecliente
- POSTGRES_PASSWORD=password
volumes :
- postgres_data:/var/lib/postgresql/data
volumes :
postgres_data :
Run with:
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
[email protected]
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
Create Database
Create a new PostgreSQL or MySQL database: CREATE DATABASE solarecliente ;
Run Migrations
Apply the database schema: This will create all necessary tables and indexes.
Seed Initial Data (Optional)
Populate the database with sample data for testing: This step is optional and only recommended for development environments.
Verifying Installation
After installation, verify everything is working correctly:
1. Check Application Status
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
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
Create Admin Account
Create your first admin user: Follow the prompts to set up your admin credentials.
Configure Authentication
Set up your preferred authentication provider (OAuth, SAML, etc.) in the admin panel: Navigate to Settings > Authentication and configure your provider.
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'
};
Set Up Backups
Configure automated database 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: Or update your .env.local file:
Database connection failed
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