A community-driven platform where students discover and share the best tools for solving common problems.
- User authentication (Google OAuth + email/password registration)
- Community-driven tool database with categories
- Upvote and rating system
- Comments and discussions
- Search and filtering capabilities
- RESTful API built with Node.js and Express
- Backend: Node.js, Express.js
- Database: MongoDB Atlas
- Authentication: Passport.js (Google OAuth + JWT)
- Validation: Joi
- Logging: Pino
- Testing: Jest
- Security: Helmet, CORS
- Node.js (v16 or higher)
- MongoDB Atlas account (free tier)
- Google Cloud Console account (for OAuth)
-
Clone the repository:
git clone <repository-url> cd studentsolution-ai
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
Fill in your actual values in
.env:MONGO_URI: Your MongoDB Atlas connection stringGOOGLE_CLIENT_ID&GOOGLE_CLIENT_SECRET: From Google Cloud ConsoleJWT_SECRET: A random string for JWT signing
-
Start the development server:
npm run dev
The server will run on
http://localhost:3000
GET /health- Server health statusGET /- Welcome message
POST /auth/register- Register new userPOST /auth/login- Login userPOST /auth/google- Initiate Google OAuthGET /auth/google/callback- OAuth callbackPOST /auth/refresh- Refresh JWT tokenPOST /auth/logout- Logout user
GET /tools- List all tools (with filtering, pagination, search)GET /tools/popular- Get popular toolsGET /tools/categories/:category- Get tools by categoryGET /tools/:id- Get tool detailsPOST /tools- Create new tool (authenticated)PUT /tools/:id- Update tool (owner only)DELETE /tools/:id- Delete tool (owner only)POST /tools/:id/upvote- Toggle upvote (authenticated)GET /tools/:id/upvote-status- Get upvote status (authenticated)
GET /comments/tools/:toolId- Get comments for a tool (with replies)POST /comments/tools/:toolId- Add comment to tool (authenticated)PUT /comments/:commentId- Update comment (owner only)DELETE /comments/:commentId- Delete comment (owner only)POST /comments/:commentId/upvote- Upvote comment (authenticated)GET /comments/:commentId/upvote-status- Check comment upvote status
GET /search?q=<query>&category=<category>&tags=<tags>&sortBy=<relevant|popular|recent>&page=<page>&limit=<limit>- Search tools with full-text search and filtersGET /search/suggest?q=<query>&limit=<limit>- Get autocomplete suggestionsGET /search/categories- Get all categories with tool counts
studentsolution-ai/
├── apps/
│ ├── users/ # User management
│ │ ├── data-access/ # Database models
│ │ ├── domain/ # Business logic
│ │ └── entry-points/# API routes
│ ├── tools/ # Tool CRUD
│ ├── ratings/ # Upvotes & comments
│ └── search/ # Search functionality
│ ├── domain/ # Search business logic
│ └── entry-points/# Search API routes
├── libraries/ # Shared utilities
├── middleware/ # Express middleware
├── config/ # Configuration
├── tests/ # Test files
├── server.js # Application entry point
├── .env.example # Environment template
└── package.json # Dependencies & scripts
npm start- Start production servernpm run dev- Start development server with nodemonnpm test- Run testsnpm run test:watch- Run tests in watch mode
npm testUse tools like Postman or curl to test the API endpoints. The server includes comprehensive error handling and logging.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
ISC
- Phase 1: Project setup & infrastructure
- Phase 2: Authentication & user management
- Phase 3: Tools database & CRUD
- Phase 4: Ratings & comments system
- Phase 5: Search & filtering
- Phase 6: Error handling & validation
- Phase 7: Testing & deployment prep
The application is containerized and can be easily deployed using Docker and Docker Compose.
-
Build and start the services:
docker-compose up -d --build
-
Access the API: The API will be available at
http://localhost:3000. -
Stop the services:
docker-compose down
Run the test suite using:
npm test