Appearance
Developer Onboarding & Environment Setup
1. System Prerequisites
Ensure your development machine has the following tools installed before setting up Intelektika Portal:
- Golang:
v1.23.0or newer. - Node.js:
v20.xLTS or newer (required for frontend build). - MongoDB:
v6.0+(running locally or via Docker). - Git:
v2.38+.
2. Step-by-Step Local Environment Setup
Step 1: Clone Repository & Install Dependencies
bash
git clone https://github.com/eyd-v-skill/intelektika-portal.git
cd intelektika-portalStep 2: Build React Frontend Assets
bash
cd web
npm install
npm run build
cd ..Step 3: Configure Environment Variables
Copy the template configuration file and update environment keys:
bash
cp .env.example .env3. Environment Variables Dictionary (.env)
| Variable Name | Data Type | Default / Example Value | Description & Security Context |
|---|---|---|---|
PORT | number | 9090 | HTTP listening port for the Intelektika Portal service. |
MONGO_URI | string | mongodb://localhost:27017 | MongoDB connection connection string. |
MONGO_DB_NAME | string | intelektika_db | Target MongoDB database name. |
JWT_SECRET | string | super_secret_jwt_key_min32chars | Secret key used to sign and verify operator JWT tokens. |
RSA_PRIVATE_KEY_PATH | string | ./keys/private_key.pem | File path to RSA-4096 private key for DRM license signing. |
RSA_PUBLIC_KEY_PATH | string | ./keys/public_key.pem | File path to RSA-4096 public key for license verification. |
ENVIRONMENT | string | development | Operating mode (development or production). |
4. RSA-4096 Key Pair Generation
If cryptographic keypair files do not exist in the keys/ directory, generate them using OpenSSL:
bash
mkdir -p keys
openssl genpkey -algorithm RSA -out keys/private_key.pem -pkeyopt rsa_keygen_bits:4096
openssl rsa -pubout -in keys/private_key.pem -out keys/public_key.pem5. Building & Executing Single Static Binary
bash
# Build single binary containing embedded frontend
go build -o bin/portal cmd/server/main.go
# Run the portal binary
./bin/portalAccess the dashboard at http://localhost:9090 with default credentials:
- Default Username:
admin - Default Password:
admin123