Prompt Details
Model
(gemini-3.1-pro)
Token size
265
Example input
[Project_Idea]: A REST API for a task management application where users can create, update, and delete tasks.
[Tech_Preference]: Node.js with Express and MongoDB
Example output
### ποΈ 1. Optimal Tech Stack
* **Backend:** Node.js with Express.js (Lightweight, incredibly fast for I/O bound REST APIs).
* **Database:** MongoDB with Mongoose (Flexible schema design, perfect for JSON-like task documents).
* **Authentication:** JWT (JSON Web Tokens) for stateless, scalable user sessions.
### π 2. Production Directory Structure
task-manager-api/
βββ src/
β βββ controllers/ # Route logic (taskController.js)
β βββ models/ # Mongoose schemas (Task.js)
β βββ routes/ # Express route definitions (taskRoutes.js)
β βββ middleware/ # Auth and error handling
β βββ config/ # Database connection (db.js)
β βββ server.js # Main application entry point
βββ .env # Environment variables
βββ .gitignore
βββ package.json # Dependencies and scripts
### π 3. Core Boilerplate Code
```javascript
// src/server.js
const express = require('express');
const mongoose = require('mongoose');
require('dotenv').config();
const app = express();
const PORT = process.env.PORT || 3000;
// Middleware
app.use(express.json());
// Health Check Route
app.get('/health', (req, res) => {
res.status(200).json({ status: 'API is running optimally' });
});
// Database Connection & Server Start
mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true, useUnifiedTopology: true })
.then(() => {
console.log('Connected to MongoDB');
app.listen(PORT, () => console.log(`Server running on port ${PORT}`));
})
.catch(err => console.error('Database connection error:', err));
By purchasing this prompt, you agree to our terms of service
GEMINI-3.1-PRO
Stop wasting hours setting up projects. This Principal Architect prompt turns your raw app idea into a production-ready directory structure, tech stack recommendation, and generates the exact core boilerplate code to kickstart your development instantly.
...more
Updated 1 week ago
