api-structure-node
v1.0.5
Published
A ready-to-start Node.js backend project generator with PostgreSQL, authentication, encryption, and best practices
Downloads
42
Maintainers
Readme
API Structure Node
Generate production-ready Node.js backend APIs with authentication, encryption, and database support.
Features
- Complete authentication system (signup, login, OTP)
- PostgreSQL/MySQL support
- Request/Response encryption
- JWT token management
- API key validation
- Modular MVC architecture
Quick Start
1. Install Package
npm install -g api-structure-node2. Generate Project
npx api-structure-node3. Create Database
Create a PostgreSQL or MySQL database for your project.
4. Configure Environment
cd your-project
cp .env.example .env
# Edit .env with your database credentials5. Run Project
npm install
npm run devAPI Endpoints
Authentication
POST /api/v1/auth/signup- User registrationPOST /api/v1/auth/verify-otp- OTP verificationPOST /api/v1/auth/login- User loginGET /api/v1/auth/profile- Get user profile
Example Request
curl -X POST http://localhost:3000/api/v1/auth/signup \
-H "Content-Type: application/json" \
-H "api-key: your-api-key" \
-d '{
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"password": "password123"
}'Project Structure
project/
├── modules/v1/auth/ # Authentication module
├── middleware/ # Custom middleware
├── config/ # Configuration files
├── database/ # Database schema
└── utils/ # Utility functionsSupport
- GitHub: api-structure-node
- Issues: Report bugs and feature requests
