Quick Start Guide
Quick Start Guide
Section titled “Quick Start Guide”Get up and running with the Surkyl Platform monorepo in just a few minutes.
Prerequisites
Section titled “Prerequisites”Before you begin, ensure you have the following installed:
- Node.js: v18 or higher (Download)
- pnpm: v8 or higher (
npm install -g pnpm) - Rust: Latest stable version (Install)
- PostgreSQL: v14 or higher (for backend development)
- Docker: Latest version (optional, for containerized services)
Installation
Section titled “Installation”1. Clone the Repository
Section titled “1. Clone the Repository”git clone <repository-url>cd aio2. Install Dependencies
Section titled “2. Install Dependencies”pnpm installThis will install all dependencies for the entire monorepo.
Running Applications
Section titled “Running Applications”Development Server
Section titled “Development Server”To run any application in development mode:
# Run the playground app (Angular)nx serve playground
# Run the docs site (Astro Starlight)nx serve docs
# Run MueSync landing pagenx serve muesync-com
# Run Surkyl websitenx serve surkyl-comRust Applications
Section titled “Rust Applications”For Rust applications, use the standard Nx commands:
# Build Rust applicationsnx build gatenx build surkyl-servernx build godseye-proxy
# Run Rust applications in developmentcargo run --bin gatecargo run --bin surkyl-servercargo run --bin godseye-proxyBuilding for Production
Section titled “Building for Production”Build All Projects
Section titled “Build All Projects”nx build <project-name>Examples:
# Build Angular appnx build playground
# Build Astro sitenx build docsnx build muesync-comnx build surkyl-com
# Build Rust applicationsnx build gatenx build surkyl-serverRunning Tests
Section titled “Running Tests”Unit Tests
Section titled “Unit Tests”# Run tests for a specific projectnx test <project-name>
# Run tests for Angular librarynx test pixel
# Run Rust testsnx test gatecargo testE2E Tests
Section titled “E2E Tests”# Run E2E tests with Playwrightnx e2e playground-e2enx e2e identity-ui-e2eCommon Tasks
Section titled “Common Tasks”View Project Graph
Section titled “View Project Graph”Visualize the dependency graph of your monorepo:
nx graphShow Available Tasks
Section titled “Show Available Tasks”See all available tasks for a project:
nx show project <project-name>Lint Code
Section titled “Lint Code”# Lint a specific projectnx lint <project-name>
# Lint all projectsnx run-many --target=lint --allFormat Code
Section titled “Format Code”# Format all filesnx format:write
# Check formattingnx format:checkDatabase Setup (for Surkyl Server)
Section titled “Database Setup (for Surkyl Server)”If you’re working with surkyl-server, you’ll need to set up PostgreSQL:
1. Install PostgreSQL
Section titled “1. Install PostgreSQL”# macOSbrew install postgresql@14
# Ubuntu/Debiansudo apt-get install postgresql-14
# Start PostgreSQLbrew services start postgresql@14 # macOSsudo systemctl start postgresql # Linux2. Create Database
Section titled “2. Create Database”createdb surkyl_server3. Run Migrations
Section titled “3. Run Migrations”cd apps/surkyl-serversqlx database setup4. Configure Environment
Section titled “4. Configure Environment”Create apps/surkyl-server/configs/surkyl-server.config.yml or set environment variables:
database: url: postgresql://postgres:postgres@localhost:5432/surkyl_server
security: jwt_secret: your-secret-key-change-this-in-productionDocker Development
Section titled “Docker Development”Some services provide Docker Compose configurations:
# Run Gate with Dockercd apps/gatedocker-compose up
# Run Surkyl Server with Dockercd apps/surkyl-serverdocker-compose up
# Run GodSEye Proxycd apps/godseye-proxydocker-compose upIDE Setup
Section titled “IDE Setup”VS Code
Section titled “VS Code”Install the recommended extensions:
- Open the workspace in VS Code
- When prompted, install recommended extensions
- Or manually install from
.vscode/extensions.json
IntelliJ / WebStorm
Section titled “IntelliJ / WebStorm”The Nx plugin is available for JetBrains IDEs.
Nx Console
Section titled “Nx Console”For a better developer experience, install Nx Console:
- VS Code: Nx Console Extension
- IntelliJ: Available in the plugin marketplace
Troubleshooting
Section titled “Troubleshooting”Port Already in Use
Section titled “Port Already in Use”If you get a port conflict error, check for running processes:
# Find process using port 4200lsof -i :4200
# Kill the processkill -9 <PID>Rust Build Errors
Section titled “Rust Build Errors”If Rust builds fail:
# Update Rustrustup update
# Clean build artifactscargo clean
# Rebuildcargo buildNode Module Issues
Section titled “Node Module Issues”If you encounter module resolution issues:
# Clean installrm -rf node_modulespnpm install
# Clear Nx cachenx resetNext Steps
Section titled “Next Steps”Now that you’re set up, explore:
- Monorepo Structure - Understand the codebase organization
- Apps Overview - Learn about each application
- Contributing Guide - Start contributing to the project
- API Reference - Explore the APIs
Getting Help
Section titled “Getting Help”If you run into issues:
- Check this documentation
- Review the project-specific README files
- Check existing GitHub issues
- Open a new issue if needed