Skip to main content

Node.js Environment

Required Version

Node.js v20+ is required, with v22 recommended for production deployments.
Sunschool uses modern JavaScript features and is tested against Node 22. The production deployment on Railway uses Node 22 via NIXPACKS. From package.json:

Verify Your Installation

Installing Node.js

PostgreSQL Database

Required Version

PostgreSQL 12+ is required. Sunschool is tested with PostgreSQL 14 and 15.
The application uses:
  • JSONB columns for complex data (lesson specs, learner profiles)
  • Array types for concept tags
  • Drizzle ORM for migrations and queries
  • WebSocket connections (Neon serverless compatible)

Database Features Used

From the schema (shared/schema.ts):

Installation Options

Package Manager

npm

Sunschool uses npm as the package manager. Minimum version 8.x required.
The project includes package.json with all dependencies. Key packages:
Installation:

System Resources

Minimum Specifications

These are absolute minimums. Production deployments should exceed these.

Memory Considerations

  • Node.js process: 200-400 MB baseline
  • PostgreSQL: 128-256 MB minimum
  • AI processing: Temporary spikes during lesson generation
  • Concurrent users: +50MB per active session

Storage Breakdown

Lesson images (SVG) average 10-50 KB each. A typical database with 1000 lessons uses ~500 MB.

Network Requirements

Ports

Default port is 5000 (configurable via PORT environment variable).

Firewall Rules

Incoming:
  • Port 5000 (HTTP) - from reverse proxy or public
  • Port 5432 (PostgreSQL) - only if database is remote
Outgoing:
  • Port 443 (HTTPS) - for AI provider APIs:
    • api.openrouter.ai
    • api.perplexity.ai
    • archive.opentensor.ai (Bittensor, optional)

Operating System

Supported Platforms

Additional Tools (Optional)

Development Tools

Production Tools

For process management and auto-restart:
For SSL termination and load balancing:

Verification Checklist

Before proceeding to installation:
1

Node.js v20+

2

npm v8+

3

PostgreSQL accessible

4

Sufficient resources

Ready to proceed? Continue to Environment Configuration