|
1 |
| -# Sanity Movies Content Studio |
| 1 | +# Portfolio Sanity CMS |
2 | 2 |
|
3 |
| -Congratulations, you have now installed the Sanity Content Studio, an open source real-time content editing environment connected to the Sanity backend. |
| 3 | +A modern, optimized Sanity CMS setup for portfolio management with enhanced schemas, validation, and performance. |
4 | 4 |
|
5 |
| -Now you can do the following things: |
| 5 | +## 🚀 Features |
6 | 6 |
|
7 |
| -- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme) |
8 |
| -- Check out one of the example frontends: [React](https://github.com/sanity-io/example-frontend-next-js) | [React Native](https://github.com/sanity-io/example-app-react-native) | [Vue](https://github.com/sanity-io/example-frontend-vue-js) | [PHP](https://github.com/sanity-io/example-frontend-silex-twig) |
9 |
| -- [Join the community Slack](https://slack.sanity.io/?utm_source=readme) |
10 |
| -- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme) |
| 7 | +### Enhanced Schemas |
| 8 | + |
| 9 | +- **Portfolio**: Projects with categories, technologies, galleries, and featured status |
| 10 | +- **Services**: Service offerings with descriptions, features, and active status |
| 11 | +- **Testimonials**: Client reviews with ratings, avatars, and company info |
| 12 | +- **Site Settings**: Global configuration for SEO, social links, and contact info |
| 13 | + |
| 14 | +### Key Improvements |
| 15 | + |
| 16 | +- ✅ **Field Validation**: Comprehensive validation rules for data integrity |
| 17 | +- ✅ **Image Optimization**: Hotspot support and metadata extraction |
| 18 | +- ✅ **Content Organization**: Ordering, filtering, and featured content |
| 19 | +- ✅ **SEO Ready**: Meta tags, Open Graph, and structured data |
| 20 | +- ✅ **Performance**: Optimized queries and efficient data fetching |
| 21 | +- ✅ **Accessibility**: Alt text and proper image handling |
| 22 | + |
| 23 | +## 📁 Schema Structure |
| 24 | + |
| 25 | +``` |
| 26 | +schemas/ |
| 27 | +├── schema.js # Main schema index |
| 28 | +├── portfolio.js # Portfolio projects |
| 29 | +├── service.js # Services offered |
| 30 | +├── testimonial.js # Client testimonials |
| 31 | +└── siteSettings.js # Global site configuration |
| 32 | +
|
| 33 | +queries/ |
| 34 | +└── index.js # Optimized Sanity queries |
| 35 | +``` |
| 36 | + |
| 37 | +## 🛠️ Usage |
| 38 | + |
| 39 | +### Portfolio Projects |
| 40 | + |
| 41 | +- **Categories**: fullstack, frontend, backend, mobile, uiux, devops |
| 42 | +- **Features**: Featured projects, galleries, technology tags |
| 43 | +- **Validation**: Required fields, URL validation, image requirements |
| 44 | + |
| 45 | +### Services |
| 46 | + |
| 47 | +- **Active/Inactive**: Toggle service availability |
| 48 | +- **Features**: List of deliverables and capabilities |
| 49 | +- **Technologies**: Skills and tools used |
| 50 | + |
| 51 | +### Testimonials |
| 52 | + |
| 53 | +- **Ratings**: 1-5 star rating system |
| 54 | +- **Featured**: Highlight best testimonials |
| 55 | +- **Rich Content**: Company info, positions, avatars |
| 56 | + |
| 57 | +### Site Settings |
| 58 | + |
| 59 | +- **SEO**: Meta titles, descriptions, Open Graph images |
| 60 | +- **Social Links**: GitHub, LinkedIn, Twitter, etc. |
| 61 | +- **Contact Info**: Email, phone, location |
| 62 | + |
| 63 | +## 🔧 Development |
| 64 | + |
| 65 | +### Running the Studio |
| 66 | + |
| 67 | +```bash |
| 68 | +cd portfoliosanitydata |
| 69 | +npm install |
| 70 | +npm start |
| 71 | +``` |
| 72 | + |
| 73 | +### Building for Production |
| 74 | + |
| 75 | +```bash |
| 76 | +npm run build |
| 77 | +``` |
| 78 | + |
| 79 | +### Adding New Content |
| 80 | + |
| 81 | +1. Start the studio: `npm start` |
| 82 | +2. Navigate to localhost:3333 |
| 83 | +3. Create content using the enhanced schemas |
| 84 | +4. Content updates automatically in your portfolio |
| 85 | + |
| 86 | +## 📊 Query Examples |
| 87 | + |
| 88 | +### Get All Projects |
| 89 | + |
| 90 | +```javascript |
| 91 | +import { portfolioQueries } from "./queries"; |
| 92 | +const projects = await client.fetch(portfolioQueries.allProjects); |
| 93 | +``` |
| 94 | + |
| 95 | +### Get Featured Content |
| 96 | + |
| 97 | +```javascript |
| 98 | +import { combinedQueries } from "./queries"; |
| 99 | +const featured = await client.fetch(combinedQueries.featuredContent); |
| 100 | +``` |
| 101 | + |
| 102 | +### Get Projects by Category |
| 103 | + |
| 104 | +```javascript |
| 105 | +const frontendProjects = await client.fetch( |
| 106 | + portfolioQueries.projectsByCategory("frontend") |
| 107 | +); |
| 108 | +``` |
| 109 | + |
| 110 | +## 🎯 Best Practices |
| 111 | + |
| 112 | +### Content Management |
| 113 | + |
| 114 | +- Use sequential IDs for portfolio and testimonials |
| 115 | +- Mark featured content for priority display |
| 116 | +- Add alt text to all images |
| 117 | +- Use proper categories and tags |
| 118 | + |
| 119 | +### Performance |
| 120 | + |
| 121 | +- Use specific queries instead of fetching all data |
| 122 | +- Implement proper ordering and filtering |
| 123 | +- Cache frequently accessed content |
| 124 | +- Optimize images with proper dimensions |
| 125 | + |
| 126 | +### SEO |
| 127 | + |
| 128 | +- Fill out all meta fields in site settings |
| 129 | +- Use descriptive titles and descriptions |
| 130 | +- Add Open Graph images for social sharing |
| 131 | +- Include structured data where possible |
| 132 | + |
| 133 | +## 🔄 Migration Notes |
| 134 | + |
| 135 | +### From Old Schema |
| 136 | + |
| 137 | +- New fields are optional with sensible defaults |
| 138 | +- Existing content will continue to work |
| 139 | +- Gradually add new fields as needed |
| 140 | +- Use the migration guide for complex changes |
| 141 | + |
| 142 | +## 📈 Future Enhancements |
| 143 | + |
| 144 | +- [ ] Blog/Articles schema |
| 145 | +- [ ] Skills/Technologies schema |
| 146 | +- [ ] Experience/Resume schema |
| 147 | +- [ ] Contact form integration |
| 148 | +- [ ] Analytics integration |
| 149 | +- [ ] Multi-language support |
| 150 | + |
| 151 | +## 🤝 Contributing |
| 152 | + |
| 153 | +1. Follow the existing schema patterns |
| 154 | +2. Add proper validation rules |
| 155 | +3. Include comprehensive documentation |
| 156 | +4. Test queries for performance |
| 157 | +5. Update this README for new features |
0 commit comments