Development Setup
Prerequisites
Section titled “Prerequisites”- Node.js >= 20
- npm or pnpm
- Git
Clone the Repository
Section titled “Clone the Repository”git clone https://github.com/0xv1shal/vps-deployer.gitcd vps-deployerInstall Dependencies
Section titled “Install Dependencies”npm installRun in Development Mode
Section titled “Run in Development Mode”npm run dev -- -w /tmp/vps-deployer -p 3000 -s dev-secret-keyThis starts the Express server in the foreground with:
- Working directory:
/tmp/vps-deployer(auto-created) - Port:
3000 - Session key:
dev-secret-key
Open http://localhost:3000 in your browser.
Build for Production
Section titled “Build for Production”npm run buildThis compiles TypeScript and copies Pug view files to dist/.
Run the Built Version
Section titled “Run the Built Version”npm start -- -w /tmp/vps-deployer -p 3000 -s dev-secret-keyProject Structure
Section titled “Project Structure”src/├── index.ts # CLI entry point├── app.ts # Express app setup├── db/ # SQLite database initialization├── middleware/ # Auth middleware├── types/ # TypeScript type augmentations├── utils/ # CLI and config utilities├── helpers/ # Shared helper functions└── modules/ # Feature modules ├── auth/ # Login/register ├── dashboard/ # Home page ├── project/ # Project CRUD ├── deployer/ # Deployment logic ├── webhook/ # GitHub webhook receiver ├── settings/ # SMTP configuration └── common/ # Shared views (404, etc.)TypeScript Configuration
Section titled “TypeScript Configuration”The project uses strict TypeScript settings:
verbatimModuleSyntax— explicit import/export typesexactOptionalPropertyTypes— strict optional handlingnoUncheckedIndexedAccess— indexed access returnsT | undefinedstrictNullChecks— null/undefined must be handled explicitly