
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@diagramers/api
Advanced tools
Diagramers API - A comprehensive Node.js API template with TypeScript, Firebase Functions, and Socket.io
A comprehensive Node.js API framework built with TypeScript, Express, MongoDB, and built-in authentication and permission management.
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Start development server
npm run dev
# Database
MONGODB_URI=mongodb://localhost:27017/diagramers
MONGODB_DB=diagramers
# JWT
JWT_SECRET=your-secret-key
JWT_EXPIRES_IN=1h
# Server
PORT=3000
NODE_ENV=development
src/
โโโ core/ # Core system components
โ โโโ app.ts # Application setup
โ โโโ server/ # Server management
โ โโโ database/ # Database connection & seeding
โ โโโ middleware/ # Authentication & permission middleware
โโโ modules/ # Business logic modules
โ โโโ auth/ # Authentication module
โ โโโ user/ # User management
โ โโโ permission/ # Permission system
โโโ shared/ # Shared utilities and types
โ โโโ types/ # TypeScript interfaces
โ โโโ utils/ # Utility functions
โ โโโ constants/ # System constants
โโโ routes/ # Route definitions
The API includes a comprehensive permission system:
For comprehensive development guides, examples, and best practices, see:
The developer guide covers:
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run seed # Seed database with sample data
npm run setup:permissions # Initialize permission system
npm run setup:admin # Create admin user
npm run generate:module # Generate new module
npm run generate:table # Generate new database table
npm run generate:endpoint # Generate new API endpoint
npm run lint # Run ESLint
npm run type-check # TypeScript type checking
npm run format # Format code with Prettier
npm run docs # Generate API documentation
http://localhost:3000/api
GET /health
- Health checkPOST /auth/login
- User authenticationGET /users
- Get all users (requires authentication)POST /users
- Create new user (requires authentication)Include JWT token in Authorization header:
Authorization: Bearer <your-jwt-token>
x-request-id: MODULE_ACTION_UUID (optional)
x-correlation-id: <correlation-id> (optional)
# Run permission tests
npm run test:permissions
# Run all tests
npm test
# Build for production
npm run build
# Start production server
npm start
# Docker deployment
npm run docker:build
npm run docker:run
NODE_ENV
- Environment (development/production)PORT
- Server portMONGODB_URI
- MongoDB connection stringJWT_SECRET
- JWT signing secretJWT_EXPIRES_IN
- JWT expiration time# Generate complete module structure
npm run generate:module -- --name=products --description="Product management"
# This creates:
# - Entity files (interfaces and schemas)
# - Service with CRUD operations
# - Controller with HTTP handlers
# - Routes with permission middleware
# - Swagger documentation
# Initialize permission system
npm run setup:permissions
# Create admin user
npm run setup:admin
src/modules/
This project is licensed under the MIT License.
For complete development guides and examples, see the Developer Guide
FAQs
Diagramers API - A comprehensive Node.js API template with TypeScript, Firebase Functions, and Socket.io
The npm package @diagramers/api receives a total of 24 weekly downloads. As such, @diagramers/api popularity was classified as not popular.
We found that @diagramers/api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.