# π― Learning Journey Guide: How Everything Fits Together
This guide explains the relationship between all the learning materials and how to use them effectively.
## π **The Learning Ecosystem**
### 1. **QUICKSTART.md** - Your Starting Point
- **Purpose**: Get up and running in 5 minutes
- **Use When**: First time setup, daily workflow
- **Contains**: Environment setup, basic testing, troubleshooting
### 2. **exercises/day-X-[topic].md** - Your Hands-On Learning
- **Purpose**: Step-by-step practical learning
- **Use When**: Daily learning sessions
- **Contains**: Complete code examples, testing instructions, progressive challenges
### 3. **docs/best-practices.md** - Your Reference Manual
- **Purpose**: Professional patterns and production techniques
- **Use When**: Need to understand WHY, building real projects, debugging issues
- **Contains**: Advanced patterns, security practices, performance optimization
### 4. **examples/weather-server.md** - Real-World Examples
- **Purpose**: See complete implementations in action
- **Use When**: Need inspiration, want to see full workflows
- **Contains**: Complete working examples with explanations
## π **How They Work Together**
```
Day 1: Learn Basics (exercises/day-1-basics.md)
β
π Reference: best-practices.md β "Server Architecture" & "Error Handling"
β
π― Apply: Create your first tool with proper error handling
Day 2: Advanced Tools (exercises/day-2-tools.md)
β
π Reference: best-practices.md β "Input Validation with Zod"
β
π― Apply: Build 3 tools with professional validation
Day 3: Resources (exercises/day-3-resources.md)
β
π Reference: best-practices.md β "Resource Management"
β
π― Apply: Create dynamic and static resources
Day 4: Prompts (exercises/day-4-prompts.md)
β
π Reference: best-practices.md β "Prompt Engineering"
β
π― Apply: Build context-aware prompts
Day 5-7: Production Ready (exercises/day-5-integration.md, etc.)
β
π Reference: best-practices.md β "Security", "Performance", "Testing"
β
π― Apply: Build production-ready features
```
## π **Learning Approach**
### **For Beginners** (You are here! π)
1. **Start**: `QUICKSTART.md` β Get environment working
2. **Learn**: `exercises/day-1-basics.md` β Follow step-by-step
3. **Understand**: `docs/best-practices.md` β Read relevant sections
4. **Practice**: Modify the examples, try bonus challenges
### **For Each Exercise Day**
```bash
# Morning routine:
1. Open: code exercises/day-X-[topic].md
2. Follow: Step-by-step instructions
3. Reference: Open best-practices.md when you see π references
4. Test: Build and verify your code works
5. Explore: Try the bonus challenges
```
### **When You Get Stuck**
1. **Check**: Error messages in terminal
2. **Reference**: Relevant section in `best-practices.md`
3. **Test**: Use `interactive-test.js` to verify
4. **Compare**: Your code vs. examples
## π **Best Practices Mapping to Exercises**
| Exercise Day | Best Practices Sections to Reference |
|--------------|--------------------------------------|
| **Day 1: Basics** | β’ Server Architecture<br>β’ Error Handling Strategy<br>β’ Input Validation with Zod |
| **Day 2: Tools** | β’ Modular Design<br>β’ Advanced Validation<br>β’ Performance Optimization |
| **Day 3: Resources** | β’ Resource Management<br>β’ Dynamic Resources<br>β’ Templated Resources |
| **Day 4: Prompts** | β’ Prompt Engineering<br>β’ Contextual Prompts |
| **Day 5: Integration** | β’ Security Best Practices<br>β’ Secrets Management |
| **Day 6: Production** | β’ Testing Strategies<br>β’ Monitoring and Logging |
| **Day 7: Advanced** | β’ Scaling Considerations<br>β’ CI/CD and Deployment |
## π‘ **Practical Example: How to Use Both**
### Scenario: Day 1 - Creating Your First Tool
1. **π Follow Exercise**: Open `exercises/day-1-basics.md`
```typescript
// Exercise shows you HOW to create a greeting tool
{
name: 'greeting',
description: 'Create personalized greetings',
// ... step by step code
}
```
2. **π Reference Best Practices**: Open `docs/best-practices.md`
```typescript
// Best practices shows you WHY and professional patterns
server.tool(
"example-tool",
"Example with proper error handling", // β Professional naming
{ input: z.string() }, // β Proper validation
async ({ input }) => {
try { // β Error handling
// Validate input
if (!input || input.trim().length === 0) {
throw new Error("Input cannot be empty");
}
// ... professional patterns
} catch (error) {
// ... proper error handling
}
}
);
```
3. **π― Apply Learning**: Improve your exercise code
```typescript
// Your enhanced greeting tool with best practices
{
name: 'greeting',
description: 'Create personalized greetings',
inputSchema: {
type: 'object',
properties: {
name: {
type: 'string',
description: 'Name of the person to greet',
minLength: 1 // β Added validation from best practices
}
// ...
}
}
}
```
## π **Quick Reference**
### **Need to DO something?** β Use Exercises
- "How do I create a tool?" β `exercises/day-1-basics.md`
- "How do I add validation?" β `exercises/day-2-tools.md`
- "How do I create resources?" β `exercises/day-3-resources.md`
### **Need to UNDERSTAND something?** β Use Best Practices
- "Why use Zod validation?" β `docs/best-practices.md` β Input Validation
- "How to handle errors properly?" β `docs/best-practices.md` β Error Handling
- "What are security concerns?" β `docs/best-practices.md` β Security
### **Need to SEE a complete example?** β Use Examples
- "How does a real server look?" β `examples/weather-server.md`
## π **Your Next Steps**
1. **Right Now**: Start with `exercises/day-1-basics.md`
2. **When You See π**: Open the corresponding section in `best-practices.md`
3. **After Each Day**: Review what you learned in both exercise and best practices
4. **For Real Projects**: Use `best-practices.md` as your professional guide
## π **Think of It This Way**
- **Exercises** = Cooking lessons (step-by-step recipes)
- **Best Practices** = Culinary techniques (why recipes work, professional tips)
- **Examples** = Restaurant dishes (complete, real-world implementations)
You need all three to become a master chef! π¨βπ³
---
*Ready to start? Open `exercises/day-1-basics.md` and let's build your first tool!*