Lewati ke konten utama

Getting Started with Neuron ERP

Home / Knowledge Base / Developers / Getting Started


Get familiar with Neuron ERP and learn how to set up your development environment.

Overview

Neuron ERP is a comprehensive Enterprise Resource Planning system built with ASP.NET Core 8.0 and Blazor Server. This guide will walk you through the initial setup process to get the application running on your local machine.

Prerequisites

Before you begin, ensure you have the following installed:

DevExpress Requirements

Important: This project uses DevExpress Blazor components which require:

  • Active DevExpress Universal or DXperience subscription
  • DevExpress NuGet feed access
  • License key for production deployment

Get Started with DevExpress:

System Requirements

ComponentMinimumRecommended
OSWindows 10, Linux, macOSWindows 11, Ubuntu 22.04
RAM4 GB8 GB or more
Storage2 GB free space5 GB or more
ProcessorDual-core 2.0 GHzQuad-core 2.5 GHz+

Quick Start

1. Clone the Repository

git https://git.neuron.id/research/erp.git
cd erp

2. Configure Database Connection

Edit Project Neuron_ERP -> .NET User Secrets to configure your PostgreSQL connection:

{
"ConnectionStrings": {
"PostgreSqlDbContext": "Host=localhost;Database=neuron_erp;Username=postgres;Password=your_password;port=5432;Timeout=300;CommandTimeout=300",
"PostgreSql_HR": "Host=localhost;Database=h_db;Username=postgres;Password=your_password;port=5432;Timeout=300;CommandTimeout=300"
}
}

Note: Replace your_password with your actual PostgreSQL password.

3. Set Up the Database

Create the required databases in PostgreSQL:

CREATE DATABASE neuron_erp;
CREATE DATABASE h_db;

4. Configure DevExpress License

DevExpress Blazor components require licensing:

# Windows PowerShell
$env:DevExpress_License="your_license_key"
setx DevExpress_License "your_license_key" # Permanent

# Linux/macOS
export DevExpress_License=your_license_key
echo 'export DevExpress_License=your_license_key' >> ~/.bashrc # Permanent

Setup DevExpress NuGet Feed:

Create nuget.config in solution root (if not exists):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="DevExpress" value="https://nuget.devexpress.com/api" />
</packageSources>
<packageSourceCredentials>
<DevExpress>
<add key="Username" value="DevExpress" />
<add key="ClearTextPassword" value="YOUR_DEVEXPRESS_NUGET_KEY" />
</DevExpress>
</packageSourceCredentials>
</configuration>

Get your NuGet key:

  1. Login to DevExpress.com
  2. Go to NuGet Feed
  3. Copy your NuGet feed credentials

Or use dotnet CLI:

dotnet nuget add source https://nuget.devexpress.com/api -n DevExpress \
-u DevExpress -p YOUR_DEVEXPRESS_NUGET_KEY --store-password-in-clear-text

5. Restore NuGet Packages

dotnet restore

6. Build the Application

dotnet build Neuron_ERP/Neuron_ERP.csproj

7. Run the Application

cd Neuron_ERP
dotnet run

The application will start and be accessible at:

  • HTTP: http://localhost:7060

Configuration Options

Authentication

The application supports Google OAuth authentication. Configure it in appsettings.json:

{
"Authentication": {
"Google": {
"ClientId": "your-client-id.apps.googleusercontent.com",
"ClientSecret": "your-client-secret"
}
}
}

Logging

Logging is configured using Serilog. Adjust log levels in appsettings.json:

{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

Mail Configuration

For email notifications, configure SMTP settings:

{
"MailCompany": "your-email@company.com",
"MailCompanyPass": "your-email-password"
}

Docker Deployment

Build Docker Image

docker build -t neuron-erp:latest \
--build-arg PROJECT=Neuron_ERP \
--build-arg DevExpress_License=your_license_key \
.

Run Docker Container

docker run -d \
-p 7060:7060 \
-e ASPNETCORE_HTTP_PORTS=7060 \
--name neuron-erp-app \
neuron-erp:latest

Using Docker Compose

Create a docker-compose.yml file:

name: neuron-erp

services:
postgres-17:
image: postgres:17.6
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: p05t6r3s
TZ: Asia/Jakarta
ports:
- "54317:5432"
cpus: 1.0
volumes:
- pg_data:/var/lib/postgresql/data
- ./database/init/01-restore.sh:/docker-entrypoint-initdb.d/01-restore.sh
- ./database/backups/:/backups
networks:
- net-postgres
neuron-erp:
image: neuron-erp:test
container_name: neuron-erp
ports:
- "7060:7060"
environment:
- Authentication__Google__ClientId=x
- Authentication__Google__ClientSecret=x
- ConnectionStrings__PostgreSqlDbContext=x
- ConnectionStrings__PostgreSql_HR=Host=x
- ASPNETCORE_HTTP_PORTS=7060
networks:
- net-postgres
depends_on:
- postgres-17

volumes:
pg_data:

networks:
net-postgres:
driver: bridge

Run with:

docker-compose up -d

Troubleshooting

Connection Issues

If you encounter database connection errors:

  1. Verify PostgreSQL is running:

    # Linux/macOS
    sudo systemctl status postgresql

    # Windows
    services.msc # Check PostgreSQL service
  2. Check firewall settings to ensure port 5432 is accessible

  3. Verify credentials in appsettings.json

Build Errors

If you get NuGet restore errors:

# Clear NuGet cache
dotnet nuget locals all --clear

# Restore packages again
dotnet restore

DevExpress License Issues

If DevExpress components show license errors:

  1. Register DevExpress License

    # Set environment variable with your DevExpress license key
    # Windows
    setx DevExpress_License "YOUR_LICENSE_KEY"

    # Linux/macOS
    export DevExpress_License="YOUR_LICENSE_KEY"
  2. Verify DevExpress Subscription

  3. Check NuGet Configuration

    # List configured sources
    dotnet nuget list source

    # Verify DevExpress packages can be accessed
    dotnet restore --verbosity detailed
  4. Common DevExpress Packages Used

    • DevExpress.Blazor - Main Blazor component library
    • DevExpress.Blazor.Reporting.Viewer - Report viewer (if used)
    • Check Neuron_ERP.csproj for complete list
  5. Trial Version Limitations

    • Trial licenses show watermark on components
    • Upgrade to full license for production use
    • Contact DevExpress sales for licensing options

Port Already in Use

If port 7060 is already in use:

# Change port in appsettings.json or use environment variable
export ASPNETCORE_HTTP_PORTS=8080
dotnet run

Next Steps

Additional Resources

Official Documentation

DevExpress Resources

DevExpress Packages Used in This Project

<!-- From Neuron_ERP.csproj -->
<PackageReference Include="DevExpress.Blazor" Version="24.1.6" />
<PackageReference Include="DevExpress.Blazor.Reporting.Viewer" Version="24.1.6" />
<PackageReference Include="DevExpress.Drawing.Skia" Version="24.1.6" />

Key Components:

  • DevExpress.Blazor - Main UI component library (DxTreeView, DxDataGrid, DxForm, etc.)
  • DevExpress.Blazor.Reporting.Viewer - Report viewer and designer
  • DevExpress.Drawing.Skia - Cross-platform rendering engine

Support

If you encounter any issues:

  1. Check the Troubleshooting section
  2. Review application logs in logs/ directory
  3. Check the GitHub Issues page
  4. Contact the development team

<< Knowledge Base Home | Next: Full Development Guide >>


Version: 1.0.0
Last Updated: January 2025
Framework: .NET 8.0