-
-
Notifications
You must be signed in to change notification settings - Fork 34
First Project
Let's build a real project using the framework - a simple task management API. This tutorial demonstrates the complete RIPER workflow.
We'll build a REST API with:
- User authentication
- CRUD operations for tasks
- Data validation
- Error handling
Let's start by researching what we need:
/research
Now, let's gather requirements:
I need to build a task management API. What are the key components I should consider?
The framework will:
- ✅ Read any existing code
- ✅ Ask clarifying questions
- ✅ Document findings in memory
- Define requirements:
What are the core features needed for a task management API?
- User registration and login
- Create, read, update, delete tasks
- Task status (pending, in-progress, completed)
- Due dates and priorities
- Check context:
!af package.json # Add package file if exists
!ad src/ # Add source directory
- Memory is updated: The framework automatically updates:
- 📋
projectbrief.md- Requirements captured - 💻
techContext.md- Technology decisions
Switch to innovate mode to explore solutions:
/innovate
Ask for innovative approaches:
What modern approaches should we consider for authentication and data validation?
- Explore authentication options:
- JWT tokens vs sessions
- OAuth integration possibilities
- Refresh token strategies
- Consider architecture patterns:
- RESTful vs GraphQL
- Microservices vs monolithic
- Database choices (SQL vs NoSQL)
- Validation strategies:
- Schema validation libraries
- Custom validators
- Error handling patterns
Context tracking:
!ac authenticationStrategy # Track auth decisions
!adoc API Design Patterns # Reference documentation
Time to create a concrete plan:
/plan
Request a detailed plan:
Create a detailed implementation plan for the task management API with authentication
## Implementation Plan: Task Management API
### Architecture
- Node.js + Express
- PostgreSQL database
- JWT authentication
- Input validation with Joi
### Project Structuresrc/ ├── controllers/ │ ├── auth.controller.js │ └── task.controller.js ├── middleware/ │ ├── auth.middleware.js │ └── validation.middleware.js ├── models/ │ ├── user.model.js │ └── task.model.js ├── routes/ │ ├── auth.routes.js │ └── task.routes.js ├── services/ │ ├── auth.service.js │ └── task.service.js ├── utils/ │ ├── database.js │ └── jwt.utils.js └── app.js
### Implementation Steps
1. Set up project structure
2. Configure database connection
3. Create user model and authentication
4. Implement JWT token generation
5. Create task model and CRUD operations
6. Add validation middleware
7. Implement error handling
8. Add tests
Protection markers added:
!cp Critical sections identified for protection
Now let's implement the plan:
/execute
- Set up project structure:
Create the project structure according to the plan
The AI will create files following the plan exactly.
- Implement authentication:
// !cp PROTECTED - JWT Secret Configuration
const JWT_SECRET = process.env.JWT_SECRET || 'your-secret-key';
// !cp END-P
// !cc CRITICAL - User Authentication
async function authenticateUser(email, password) {
const user = await User.findOne({ email });
if (!user || !await bcrypt.compare(password, user.password)) {
throw new Error('Invalid credentials');
}
return generateToken(user);
}
// !cc END-C- Track implementation:
!af src/controllers/auth.controller.js
!ac authenticateUser()
- ✅ Can create and modify files
- ✅ Must follow the plan exactly
- ❌ Cannot deviate or "improve"
- ❌ Cannot search web (stay focused)
Finally, let's review our work:
/review
- Check implementation against plan:
Review the implementation against our plan. Are all components implemented correctly?
- Verify protection:
Check that all critical code sections are properly protected
- Review findings:
- ✅ All planned components implemented
- ✅ Authentication working correctly
- ✅ CRUD operations complete
⚠️ Missing: Rate limiting (not in original plan)
After completing the project, your memory bank contains:
-
📋 projectbrief.md
- Complete requirements
- Success criteria
- Scope definition
-
🏛️ systemPatterns.md
- API architecture
- Design patterns used
- Component relationships
-
💻 techContext.md
- Technology stack
- Dependencies
- Environment setup
-
🔮 activeContext.md
- Current focus areas
- Protected code sections
- Active file references
-
📊 progress.md
- Completed features
- Test results
- Outstanding items
- Research First - Gather all requirements before designing
- Innovate Freely - Explore options without committing
- Plan Thoroughly - Detailed plans make execution smooth
- Execute Faithfully - Stick to the plan, no surprises
- Review Honestly - Catch issues before deployment
-
Add more features:
- User roles and permissions
- Task sharing and collaboration
- Email notifications
-
Improve security:
!cp Mark more sections as PROTECTED !cg Add GUARDED sections for sensitive logic -
Expand context:
!af test/auth.test.js # Add test files !ad docs/ # Add documentation
-
Protection Practice:
- Add protection to database queries
- Guard configuration files
- Mark critical business logic
-
Context Management:
- Create focused contexts for features
- Use mode-specific contexts
- Clear irrelevant context
-
Permission Testing:
- Try forbidden operations in each mode
- Understand permission boundaries
- Practice safe mode transitions
- 🧠 Deep Dive: RIPER Modes
- 🛡️ Advanced Protection Strategies
- 📎 Context Management Mastery
- 🔄 Workflow Optimization
You've completed your first project with CursorRIPER♦Σ! You now understand:
- ✅ The complete RIPER workflow
- ✅ How to protect critical code
- ✅ Context management basics
- ✅ Permission boundaries
- ✅ Memory bank usage
- Build your own project idea
- Enable MCP integrations for more power
- Try BMAD enterprise features for teams
- 🔄 Mode Transitions
- 💾 Memory Management
- 🛡️ Protection Workflow
- 📎 Context Management
- 👥 Team Collaboration
-
Installation Issues
- Node.js Version Compatibility
- Package Installation Failures
- Framework Dependencies Missing
- Database Connection Issues
- Port Conflicts
- Environment Setup Issues
- Build and Development Issues
- Framework CLI Issues
-
Configuration & Runtime Issues
- Framework Configuration Problems
- Runtime Performance Issues
- Module Loading and Plugin Issues
- Database and Storage Issues
- Memory Leaks and High Memory Usage
- High CPU Usage
-
BMAD Module Issues
- BMAD Module Initialization Problems
- Business Model Canvas Issues
- Stakeholder Management Issues
- Analytics and Reporting Issues
- Performance Optimization
-
Database & API Issues
- Database Connection Problems
- Database Migration Issues
- API Performance and Reliability Issues
- Data Consistency Issues
- Transaction Problems
-
Performance & Memory Issues
- Memory Management
- CPU Optimization
- Database Query Performance
- Caching Issues
- Resource Monitoring
-
Security & Authentication Issues
- Authentication Failures
- Authorization Problems
- JWT Token Issues
- Session Management
- CORS and Security Headers
- SSL/TLS Configuration
-
Deployment & Production Issues
- Production Deployment Failures
- Environment Configuration
- Load Balancing Issues
- Monitoring and Logging
- Backup and Recovery
When reporting issues, please include:
- Framework version (
npm list @cursoriper/core) - Node.js version (
node --version) - Operating system and version
- Error messages and stack traces
- Steps to reproduce the issue
- Configuration files (sanitized)
- Recent changes or deployments
- Technical Support: support@cursoriper.com
- Documentation: https://docs.cursoriper.com
- Community Forum: https://community.cursoriper.com