Company Management API
CompletedDeveloped a SaaS backend application that allows companies to register, manage subscriptions, employees, and shared file resources. Companies register using email verification and can securely authenticate, update profile information, and manage passwords. After activation, companies select a subscription plan (Free, Basic, or Premium), each with defined user limits, file processing limits, and billing rules. The system supports subscription upgrades and downgrades, tracks monthly file usage, and calculates billing amounts based on the active plan and overage rules. Payment processing is intentionally excluded, focusing on accurate billing logic and usage tracking. Implemented role-based access control with Company Administrator and Employee roles. Administrators can invite and remove employees, while invited employees activate their accounts via email. Employees have restricted permissions and cannot manage other users. Built a secure file management system allowing CSV, XLS, and XLSX uploads. Files can be shared with all employees or restricted to selected users, with permissions editable at any time. Administrators have full visibility over all files. The application is implemented as a RESTful API using NestJS/Express with a relational database (PostgreSQL/MySQL). It includes input validation, centralized error handling, authentication, security best practices, unit testing, Docker support, and API testing using Postman.
Features
- Company registration with email verification
- Authentication and password management
- Subscription plans (Free, Basic, Premium) with limits
- Subscription upgrade and downgrade
- Monthly usage tracking and billing calculation
- Admin and employee roles with access control
- Employee invitation and account activation via email
- File upload (CSV, XLS, XLSX)
- File access permissions (all users or selected employees)
- File permission updates and deletion
- Admin-only employee management