You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance Typo website with comprehensive improvements and documentation (#151)
* Enhance Typo website with comprehensive improvements and documentation
This major update transforms the Typo website from a basic documentation site
into a comprehensive, professional marketing and documentation platform that
accurately showcases Typo's capabilities with real, compilable code examples.
## 🎨 Website Visual & UX Improvements
- **Professional Design**: Modern, clean layout with improved typography and spacing
- **Enhanced Feature Showcase**: Comprehensive component displaying all major Typo features
- **Improved Navigation**: Reorganized sidebar with logical grouping and "Advanced Features" section
- **Consistent Branding**: Updated logo and generated matching favicon (SVG + ICO)
- **Better Code Examples**: Split SQL/Scala code blocks with proper syntax highlighting
## 📚 Documentation Enhancements
- **DSL In-Depth Guide**: Complete 400+ line comprehensive DSL documentation covering:
- Basic selects, where clauses, joins, updates, deletes
- Foreign key navigation with joinFk
- Tuple syntax with ~ operator
- Null handling and type safety
- Performance considerations and SQL printing
- **Database Libraries Section**: Added detailed customization docs for Anorm/Doobie/ZIO-JDBC
- **Fixed Broken Links**: Resolved anchor reference issues and updated relative paths
## 🔧 Development Infrastructure
- **Frontpage Code Generation**: Real PostgreSQL schema generates accurate code examples
- Created `init/data/frontpage/` with comprehensive test schema
- Built `GeneratedFrontpage.scala` script for automatic code generation
- Added domains, enums, foreign keys, composite keys, and complex relationships
- **Asset Generation Scripts**:
- `generate-logo.js` - SVG logo with purple gradient
- `generate-favicon.js` - Matching favicon in SVG/ICO formats with npm integration
- **Documentation Workflow**: Added CLAUDE.md section documenting the manual frontpage update process
## 📋 Content & Accuracy Improvements
- **Real Code Examples**: All website examples now generated from actual Typo output
- **Consistent Naming**: Converted all examples from plural to singular table names
- **Marketing Refinements**:
- Removed exaggerated claims ("10x faster" → "faster")
- Added specific Hibernate criticisms in ORM comparisons
- Enhanced type safety messaging with nullability handling
- Updated feature descriptions for accuracy
- **Comprehensive Coverage**: Added examples for:
- Composite primary keys (separated SQL/Scala blocks)
- PostgreSQL domains and enums
- Streaming operations and batch processing
- Testing with mocks and TestInsert
- Advanced PostgreSQL types (arrays, JSONB, geometric types)
## 🛠️ Technical Improvements
- **Build System**: Added bleep script for frontpage code generation
- **Git Management**: Added `frontpage-generated/` to gitignore (generated code not tracked)
- **Modern Favicon Support**: SVG favicon for modern browsers, ICO fallback for legacy
- **Broken Anchor Fixes**: Resolved documentation link issues
- **mdoc Integration**: All DSL examples compile correctly with proper invisible setup blocks
## 📊 Impact
- **39 files changed**: 3,379 insertions, 500 deletions
- **New Files**: 9 new components and scripts
- **Documentation**: 400+ lines of new DSL documentation
- **Schema**: 153-line comprehensive PostgreSQL test schema
- **Real Examples**: All code samples now generated from working Typo output
This update establishes Typo's website as a professional, accurate showcase of its
capabilities while providing developers with comprehensive, tested documentation
and real code examples they can trust and use immediately.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
* Add GitHub Actions workflow for automatic website deployment
- Deploy documentation site to GitHub Pages on main branch pushes
- Builds docs with bleep generate-docs + Docusaurus
- Uses standard GitHub Pages deployment action
- Site will be available at https://oyvindberg.github.io/typo/
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Format code with bleep fmt
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,6 +251,45 @@ npm run serve
251
251
- Check `bleep.yaml` for script configurations
252
252
- Use database introspection tools to verify schema
253
253
254
+
### Working with Frontpage Code Examples
255
+
256
+
The website's code examples are generated from real Typo code using the `frontpage` schema in the test database. This ensures that all examples shown on the website are accurate and compile correctly.
-`schema.sql` - Database schema for frontpage examples
260
+
-`*.sql` - SQL files that generate Typo repositories and types
261
+
262
+
**Generation Process**:
263
+
1.**Modify Schema**: Edit files in `init/data/frontpage/` to change database structure or add new examples
264
+
2.**Restart Database**: Run `docker-compose down && docker-compose up -d` to apply schema changes
265
+
3.**Generate Code**: Run `bleep run GeneratedFrontpage` to generate fresh Scala code
266
+
4.**Update Website**: Manually copy the generated code from `frontpage-generated/` into website components in `site/src/components/FeatureShowcase/index.js`
267
+
268
+
**Important Notes**:
269
+
- The `frontpage-generated/` directory is gitignored - we don't check in generated code
270
+
- The frontpage schema uses real PostgreSQL features (domains, enums, foreign keys) to showcase Typo's capabilities
271
+
- Always verify examples compile by running `bleep generate-docs` after updating website code
272
+
- This is the only part of the documentation workflow that requires manual copying of generated code
273
+
- Website logo and favicon can be regenerated using `site/scripts/generate-logo.js` and `npm run generate-favicon`
274
+
275
+
**Example Workflow**:
276
+
```bash
277
+
# 1. Edit schema
278
+
vi init/data/frontpage/schema.sql
279
+
280
+
# 2. Restart database
281
+
docker-compose down && docker-compose up -d
282
+
283
+
# 3. Generate fresh code
284
+
bleep run GeneratedFrontpage
285
+
286
+
# 4. Copy relevant parts to website (manual step)
287
+
# Look in frontpage-generated/ for the code you need
0 commit comments