First Project - johnpeterman72/CursorRIPER.sigma GitHub Wiki
๐ฏ Your First Project with CursorRIPERโฆฮฃ
Let's build a real project using the framework - a simple task management API. This tutorial demonstrates the complete RIPER workflow.
๐ Project Overview
We'll build a REST API with:
- User authentication
- CRUD operations for tasks
- Data validation
- Error handling
๐ Phase 1: Research Mode
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
Research Activities
- 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
๐ก Phase 2: Innovate Mode
Switch to innovate mode to explore solutions:
/innovate
Ask for innovative approaches:
What modern approaches should we consider for authentication and data validation?
Innovation Activities
- 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
๐ Phase 3: Plan Mode
Time to create a concrete plan:
/plan
Request a detailed plan:
Create a detailed implementation plan for the task management API with authentication
The Plan (Generated)
## Implementation Plan: Task Management API
### Architecture
- Node.js + Express
- PostgreSQL database
- JWT authentication
- Input validation with Joi
### Project Structure
src/ โโโ 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
โ๏ธ Phase 4: Execute Mode
Now let's implement the plan:
/execute
Execute the Plan
- 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()
Key Implementation Rules in Execute Mode
- โ Can create and modify files
- โ Must follow the plan exactly
- โ Cannot deviate or "improve"
- โ Cannot search web (stay focused)
๐ Phase 5: Review Mode
Finally, let's review our work:
/review
Review Activities
- 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)
๐ Project Completion
Memory Bank Status
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
๐ Lessons Learned
- 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
๐ Next Steps
Enhance Your Project
-
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
Try These Exercises
-
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
๐ Further Learning
- ๐ง Deep Dive: RIPER Modes
- ๐ก๏ธ Advanced Protection Strategies
- ๐ Context Management Mastery
- ๐ Workflow Optimization
๐ Congratulations!
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
Ready for More?
- Build your own project idea
- Enable MCP integrations for more power
- Try BMAD enterprise features for teams