Quick reference for development. For detailed guides, see See Also section at the bottom.
AlianHub is a self-hosted, open-source project management system designed for teams needing customization, transparency, and data control without vendor lock-in.
- Self-hosted: Run on your own servers
- Highly customizable: Custom fields, templates, workflows
- Multi-tenant: Single instance serves multiple companies
- Real-time collaboration: Socket.io LiveSync for instant updates
- Open-source: AGPL-3.0 licensed, community-driven
Target Users: Enterprises, startups, and teams requiring control, customization, and compliance with data residency requirements.
git clone https://github.com/aliansoftwareteam/AlianHub-Project-Management-System.git
cd AlianHub-Project-Management-System
npm install
cp .env.example .env # Edit .env with your config
npm run nodemon # Start dev server on port 4000Visit http://localhost:4000 β Follow installation wizard β Create company & admin user
PORT=4000
MONGODB_URL="mongodb://localhost:27017"
JWT_SECRET="your-random-secret-string"
APIURL="http://localhost:4000/"
STORAGE_TYPE="server" # or "wasabi" for productionSee .env.example for complete configuration options.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Web (Vue.js) + Desktop (Electron) β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β
βββββββββββΌβββββββββββ
β Express API β
β /api/v2/* β
β Socket.io Events β
β JWT Auth β
βββββββββββ¬βββββββββββ
β
ββββββββββββββββββ΄βββββββββββββββββ
βΌ βΌ
MongoDB Storage
(company-scoped) (Wasabi/Local)
Key Principle: All data scoped to companyId for multi-tenancy safety.
Modules are organized by feature, not layer:
Modules/FeatureName/
βββ controller/ # HTTP request handlers
βββ helpers/ # Business logic
βββ routes.js # Endpoint definitions
βββ schema.js # MongoDB schema (if applicable)
Registration pattern: Each module exports init(app) function in routes.js.
// β
Correct: Company-scoped
MongoDbCrudOpration(companyId, mongoObj, 'findOne');
// β WRONG: Data leak!
Task.findOne({ taskId: 123 });// β
Correct: Use SCHEMA_TYPE enum
{ type: SCHEMA_TYPE.PROJECTS, data: [...] }
// β WRONG: String fails silently
{ type: 'projects', data: [...] }// β
Correct: Broadcast for real-time updates
MongoDbCrudOpration(...).then(result => {
emitEvent('PROJECT_UPDATED', { projectId: result._id });
res.json({ status: true, data: result });
});
// β WRONG: Other clients don't see the change
MongoDbCrudOpration(...).then(result => {
res.json({ status: true, data: result }); // Missing emit
});// β
Correct: Remove stale cached data
removeCache(`project:${projectId}`);
removeCache(`projectList:${companyId}`);
// β WRONG: Users see stale data
// (Cache still has old data, no removeCache call)- Express 4.21.2 β HTTP framework
- MongoDB + Mongoose β Document database (why: flexible schema, nested documents)
- Socket.io 4.8.1 β Real-time WebSocket events
- JWT + bcrypt β Stateless authentication
- Winston β Structured logging
- Wasabi S3 β File storage (or local filesystem)
- node-cache β In-memory caching
- Vue.js β Reactive UI
- Pinia/Vuex β State management
- Vue Router β Client-side routing
- vue-i18n β Multi-language support
For detailed rationale, see .claude/TECH-STACK.md.
| Command | Purpose |
|---|---|
npm run nodemon |
Dev server with hot-reload |
npm start |
Production server |
npm run check-version |
Check app version |
cd frontend && npm run build |
Build Vue.js frontend |
| Folder | Purpose |
|---|---|
Config/ |
Configuration (env vars, collections) |
Modules/ |
Feature modules (50+) |
frontend/ |
Vue.js app |
common-storage/ |
File storage abstraction |
event/ |
Socket.io real-time events |
middlewares/ |
Express middleware |
utils/ |
Shared utilities & data files |
.claude/ |
Claude Code documentation |
See .claude/FOLDER-STRUCTURE.md for detailed layout.
- Module folders: PascalCase (
Modules/Project/) - Files: camelCase (
getProject.js,routes.js,helper.js) - Functions: camelCase (
loginAuth(),updateTask()) - Constants: UPPER_SNAKE_CASE (
SCHEMA_TYPE,MAX_FILE_SIZE) - API endpoints: kebab-case with version (
/api/v2/tasks/create)
// Success
{ status: true, statusText: "...", data: {...} }
// Error
{ status: false, statusText: "...", message: "..." }try {
// ... logic
} catch (error) {
req.errorMessageObject = { message: error.message, statusCode: 400 };
next(); // Passes to error middleware
}See .claude/CONVENTIONS.md for full naming guide.
- Always scope to companyId β All queries must filter by company
- Hash passwords with bcrypt β Never store plain text
- Validate input β Check type, length, enum values at API boundary
- Use environment variables β Never hardcode secrets
- Use HTTPS in production β Protects JWT tokens
- Emit after mutations β Socket.io events for real-time sync
See .claude/SECURITY-PATTERNS.md for detailed practices.
Setup & Installation
- .claude/SETUP.md β Detailed installation, environment variables, MongoDB setup
Architecture & Design
- .claude/ARCHITECTURE.md β System design, data flow, patterns
- .claude/DESIGN.md β Why MongoDB? Why Socket.io? Trade-offs explained
- .claude/TECH-STACK.md β Technology choices and dependencies
Development Guides
- .claude/CONVENTIONS.md β Code naming, module organization, patterns
- .claude/FOLDER-STRUCTURE.md β Project layout and file organization
- .claude/COMMON-TASKS.md β How to add features, routes, tests, files
Best Practices
- .claude/SECURITY-PATTERNS.md β Security essentials (companyId scoping, JWT, validation)
- .claude/ANTI-PATTERNS.md β What NOT to do (with explanations)
References & Resources
- .claude/REFERENCES.md β External links, documentation, tools
- .claude/MEMORY.md β Persistent memory index
Historical QA & Audits
- .claude/archives/qa-reports/ β QA reports and audits (historical)
- Tech Stack: Node.js, Express, MongoDB, Socket.io, Vue.js
- Modules: 50+ feature modules
- Database: MongoDB (multi-tenant, company-scoped)
- Authentication: JWT + OAuth (GitHub, Google)
- Real-time: Socket.io with fallbacks
- Storage: Wasabi S3 or local filesystem
- License: AGPL-3.0 (open-source, copyleft)
| What | Where |
|---|---|
| Contribute | See CONTRIBUTING.md |
| Security Policy | See SECURITY.md |
| GitHub | https://github.com/aliansoftwareteam/AlianHub-Project-Management-System |
| Issues | https://github.com/aliansoftwareteam/AlianHub-Project-Management-System/issues |
| Docs | https://help.alianhub.com |
Last Updated: 2026-05-12
Version: 14.0.26
Status: β
Documentation reorganized for Claude Code