The Locus API is a RESTful API designed for the Architecture/Real Estate/Education sectors. Its primary objective is to calculate and provide the complete construction potential of urban lots based on municipal urban planning legislation. The API centralizes land use and occupation rules, enabling architects, investors, buyers, students, brokers, and real estate agencies to analyze lot construction feasibility in seconds.
Drastically reduce legislation consultation time and eliminate human errors in construction potential calculations. The system cross-references lot data (Area/Location) with database rules (Zoning) to generate instant reports through API endpoints.
This is a REST API backend project.
- Runtime: Node.js (ES Modules)
- Framework: Express
- Database: PostgreSQL
- ORM: Sequelize
- File Handling: Multer (Profile picture uploads)
- Architecture: RESTful API
Note: The frontend will be developed in a separate repository.
- Location Management: CRUD operations for Cities and Urban Zones
- Rules Management: Define indexes (FAR - Floor Area Ratio, LCR - Lot Coverage Ratio) by Zone and Use Type
- Use Management: Register use types (Residential, Commercial, Industrial)
- Feasibility Calculation: Automatic construction potential processing
- Profile Management: Profile picture upload (Single photo per user)
- Built Area Calculation: Total buildable area based
- Footprint Calculation: Maximum ground coverage based
- Multi-use Support: Different calculations for Residential, Commercial, and Industrial uses
This project was developed following core Secure by Design principles:
- Input Validation: Strict data validation using Yup to prevent improper data injection.
- Protection Headers: Implementation of Helmet to secure HTTP headers against common vulnerabilities (XSS, Sniffing, etc).
- Rate Limiting: Application-layer protection against Brute Force and DoS attacks.
- Secure Uploads: Strict MIME-Type validation and file size limits to mitigate Remote Code Execution (RCE) risks.
- Password Hashing: Usage of Bcrypt with salting for secure credential storage.
locus-api/
├── src/
│ ├── config/ # Database and environment configurations
│ ├── controllers/ # Request handlers
│ ├── models/ # Sequelize models
│ ├── routes/ # API routes
│ ├── middlewares/ # Custom middlewares
│ ├── services/ # Business logic
│ └── utils/ # Helper functions
├── uploads/ # User uploaded files
└── server.js # Entry point
- Node.js (v18+)
- PostgreSQL
- npm or yarn
# Clone the repository
git clone https://github.com/eRodrigoVanini/locus-api.git
# Navigate to project directory
cd locus-api
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env
# Run migrations
npm run migrate
# Start development server
npm run devAPI documentation will be available at /api/docs (Coming soon)
The following advanced features are planned for upcoming releases:
Phase 2 - Advanced Analysis
- 3D volumetric simulation and shadow analysis
- Automated setback and height validation
- Parking space requirement calculations
- Building height and bulk plane compliance checking
Phase 3 - Geospatial Features
- Interactive mapping (Leaflet/Mapbox integration)
- Address-based zone auto-detection
- City zoning map overlay layers
- Surroundings and amenities analysis
Phase 4 - Documentation & Reports
- PDF feasibility report generation
- Automatic descriptive memorial
- NBR-compliant area tables
- Multi-scenario comparisons
Phase 5 - AI & Optimization
- Intelligent building placement suggestions
- Permitted use comparisons
- Smart alert system for restrictions
- AI-driven optimal building recommendations
Stay tuned for updates!
This project is proprietary. All rights reserved.
Rodrigo Vanini
- GitHub: @eRodrigoVanini