Backend for Arthankur - A platform for startups to check eligibility for various government schemes.
- User Authentication (Login/Register) for startups and investors
- Government schemes eligibility checking based on startup profile
- API endpoints for managing user profiles, schemes, and eligibility
- Node.js (v14+ recommended)
- npm or yarn
- MongoDB (either local or Atlas)
- Clone the repository
- Navigate to the backend directory:
cd backend_Arthankur/Backend - Install dependencies:
npm install - Create a
.envfile in the root directory with the following variables:NODE_ENV=development MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key PORT=5000
-
Start the server:
npm startOr for development with auto-reload:
npm run dev -
Seed the database with sample government schemes:
npm run seed -
Test MongoDB connection:
npm run test-connection -
Test scheme eligibility with a sample user:
npm run test-eligibility
POST /api/users/register- Register a new user (startup or investor)POST /api/users/login- Login existing user
GET /api/users/:id- Get user profilePUT /api/users/:id- Update user profile
GET /api/government-schemes- Get all schemesGET /api/government-schemes/:id- Get scheme by IDGET /api/government-schemes/eligibility/:userId- Check user eligibility for schemesPOST /api/government-schemes- Add a new scheme (admin only)
The eligibility check considers the following parameters:
- Startup Stage (Idea, Prototype, Early Stage, Growth, Mature)
- Industry Type (IT/Tech, Healthcare, Education, etc.)
- Annual Revenue (Pre-revenue, 0-10 Lakhs, etc.)
- Number of Employees (ranges like 1-10, 11-50, etc.)
- Registered Location (Metro City, Tier 1/2/3 City, Rural Area)
- Existing Government Support (Yes/No)
The backend is built using:
- Express.js - Web framework
- MongoDB/Mongoose - Database and ODM
- JWT - Authentication
- bcrypt - Password hashing