@@ -189,11 +189,330 @@ See: https://github.com/wgtechlabs/clean-commit
189189
190190---
191191
192+ ## Real-World Examples
193+
194+ This section shows real-world commit examples organized by project type to help you apply Clean Commit to your projects.
195+
196+ ### Web Application
197+
198+ ** Context:** A full-stack web app with React frontend and Node.js backend
199+
200+ #### Feature Development
201+ ```
202+ π¦ new: user profile page with avatar upload
203+ π¦ new(auth): social login with google and github
204+ π¦ new(dashboard): real-time analytics widgets
205+ π§ update(ui): improve mobile responsive layout
206+ π§ update: optimize image loading with lazy loading
207+ ποΈ remove(ui): deprecated jquery legacy code
208+ ```
209+
210+ #### Bug Fixes & Improvements
211+ ```
212+ π§ update: fix cart total calculation rounding error
213+ π§ update(form): improve validation error messages
214+ π§ update(api): handle network timeout gracefully
215+ π security: sanitize html input to prevent xss
216+ π security(session): implement csrf token validation
217+ ```
218+
219+ #### Testing & Documentation
220+ ```
221+ π§ͺ test(e2e): add cypress tests for checkout flow
222+ π§ͺ test: increase coverage for payment module
223+ π docs: update component usage examples
224+ π docs(api): document authentication flow
225+ ```
226+
227+ #### Maintenance
228+ ```
229+ β chore(deps): bump react from 17.0.2 to 18.2.0
230+ β chore: update webpack to version 5
231+ βοΈ setup(ci): add automated deployment pipeline
232+ βοΈ setup: configure storybook for components
233+ ```
234+
235+ #### Release
236+ ```
237+ π release: version 2.0.0
238+ π release: hotfix version 2.0.1 for login bug
239+ ```
240+
241+ ### API / Backend
242+
243+ ** Context:** RESTful API service with database and authentication
244+
245+ #### API Development
246+ ```
247+ π¦ new(api): user registration endpoint with validation
248+ π¦ new: rate limiting middleware for api protection
249+ π¦ new(db): migration for orders table
250+ π¦ new(auth): jwt token refresh mechanism
251+ π§ update(api): improve error response format
252+ π§ update: optimize database query with indexing
253+ π§ update(middleware): refactor logging to use winston
254+ ```
255+
256+ #### Security & Performance
257+ ```
258+ π security(api): add input validation to prevent injection
259+ π security: hash passwords with bcrypt instead of md5
260+ π security(auth): fix authorization bypass in admin routes
261+ π§ update: implement connection pooling for database
262+ π§ update(cache): add redis caching for frequent queries
263+ ```
264+
265+ #### Database & Infrastructure
266+ ```
267+ π¦ new(db): add full-text search indexes
268+ π§ update(db): optimize user query performance
269+ ποΈ remove(db): drop unused legacy tables
270+ βοΈ setup(docker): containerize application with compose
271+ βοΈ setup: configure automated database backups
272+ ```
273+
274+ #### Testing & Documentation
275+ ```
276+ π§ͺ test(api): integration tests for auth endpoints
277+ π§ͺ test: add load testing with artillery
278+ π docs(api): generate swagger documentation
279+ π docs: add architecture decision records
280+ ```
281+
282+ #### Maintenance & Release
283+ ```
284+ β chore(deps): update express to latest security patch
285+ β chore: clean up deprecated api endpoints
286+ π release: version 3.1.0 with new features
287+ ```
288+
289+ ### Library / SDK
290+
291+ ** Context:** JavaScript/TypeScript library for developers
292+
293+ #### Library Features
294+ ```
295+ π¦ new: add async/await support to all methods
296+ π¦ new(api): client method for batch operations
297+ π¦ new: typescript type definitions
298+ π§ update: improve error handling with custom errors
299+ π§ update: refactor core module for better performance
300+ ποΈ remove: deprecated callback-based api
301+ ```
302+
303+ #### API Changes
304+ ```
305+ π§ update(api): simplify configuration options
306+ π§ update: change default timeout to 30 seconds
307+ π docs(breaking): document v3 migration guide
308+ π release: version 3.0.0 with breaking changes
309+ ```
310+
311+ #### Developer Experience
312+ ```
313+ π¦ new: add debug mode for troubleshooting
314+ π§ update: improve error messages with actionable hints
315+ π docs: add interactive examples to readme
316+ π docs(api): document all public methods with jsdoc
317+ π docs: create getting started tutorial
318+ ```
319+
320+ #### Testing & Quality
321+ ```
322+ π§ͺ test: add unit tests for all core modules
323+ π§ͺ test: achieve 95% code coverage
324+ βοΈ setup: configure automatic type checking
325+ βοΈ setup(ci): add automated npm publishing
326+ β chore: update dependencies to latest stable
327+ ```
328+
329+ #### Distribution
330+ ```
331+ π¦ new: add esm module support
332+ π¦ new: add umd bundle for browsers
333+ βοΈ setup(build): optimize bundle size with rollup
334+ π release: publish version 2.5.0 to npm
335+ ```
336+
337+ ### CLI Tool
338+
339+ ** Context:** Command-line tool built with Node.js
340+
341+ #### Commands & Features
342+ ```
343+ π¦ new: add init command for project setup
344+ π¦ new(cmd): deploy command with progress bar
345+ π¦ new: interactive configuration wizard
346+ π§ update(cli): improve help text formatting
347+ π§ update: add colorized output for better readability
348+ ποΈ remove: deprecated --legacy flag
349+ ```
350+
351+ #### User Experience
352+ ```
353+ π¦ new: add autocomplete support for bash and zsh
354+ π¦ new(ui): spinner animation for long operations
355+ π§ update: improve error messages with suggestions
356+ π§ update(config): support yaml and json config files
357+ π docs: add command examples to help text
358+ ```
359+
360+ #### Installation & Distribution
361+ ```
362+ βοΈ setup: add installation script for multiple platforms
363+ βοΈ setup(ci): automate binary builds for releases
364+ π¦ new: support installation via homebrew
365+ π¦ new: add windows installer
366+ π release: version 1.0.0 stable release
367+ ```
368+
369+ #### Testing & Debugging
370+ ```
371+ π§ͺ test: add integration tests for all commands
372+ π§ͺ test(cmd): test deploy command with mocked api
373+ π¦ new(debug): add verbose flag for troubleshooting
374+ β chore(deps): update commander to latest version
375+ ```
376+
377+ #### Documentation
378+ ```
379+ π docs: create comprehensive usage guide
380+ π docs(examples): add real-world workflow examples
381+ π docs: add troubleshooting section
382+ π docs(install): platform-specific installation guides
383+ ```
384+
385+ ### Bot (Discord/Telegram)
386+
387+ ** Context:** Chat bot with commands and event handlers
388+
389+ #### Bot Commands
390+ ```
391+ π¦ new(cmd): welcome command for new members
392+ π¦ new: moderation commands for admins
393+ π¦ new(cmd): poll creation with reaction voting
394+ π§ update: improve help command with categories
395+ π§ update(cmd): enhance music player with queue system
396+ ποΈ remove: deprecated legacy command syntax
397+ ```
398+
399+ #### Features & Integrations
400+ ```
401+ π¦ new: integration with spotify api
402+ π¦ new(feature): automated role assignment
403+ π¦ new: custom embed messages with rich formatting
404+ π§ update: improve message parsing and validation
405+ π§ update(db): migrate to postgresql for better scaling
406+ ```
407+
408+ #### Event Handlers
409+ ```
410+ π¦ new(event): handle member join events
411+ π¦ new: reaction role system
412+ π§ update(event): improve message deletion logging
413+ π§ update: add rate limiting for command usage
414+ π security: validate user permissions before commands
415+ ```
416+
417+ #### Configuration & Deployment
418+ ```
419+ βοΈ setup: add environment variable configuration
420+ βοΈ setup(deploy): containerize bot with docker
421+ π¦ new(config): per-server configuration system
422+ β chore: update discord.js to latest version
423+ ```
424+
425+ #### Testing & Documentation
426+ ```
427+ π§ͺ test: add unit tests for command handlers
428+ π§ͺ test: mock discord api for integration tests
429+ π docs: create bot setup guide for server admins
430+ π docs(commands): document all available commands
431+ π release: deploy version 2.0.0 to production
432+ ```
433+
434+ ### GitHub Action
435+
436+ ** Context:** Custom GitHub Action for CI/CD workflows
437+
438+ #### Action Development
439+ ```
440+ π¦ new: initial action for code quality checks
441+ π¦ new(input): add customizable threshold options
442+ π¦ new: support for multiple programming languages
443+ π§ update: improve performance of file scanning
444+ π§ update(output): add detailed report generation
445+ ποΈ remove: legacy node 12 support
446+ ```
447+
448+ #### Integration & Compatibility
449+ ```
450+ π¦ new: add support for pull request comments
451+ π¦ new(integration): slack notification output
452+ π§ update: support both github token and app auth
453+ π§ update: improve error handling with actionable messages
454+ βοΈ setup(ci): add automated testing workflow
455+ ```
456+
457+ #### Documentation & Examples
458+ ```
459+ π docs: create comprehensive action usage guide
460+ π docs(examples): add workflow examples for common scenarios
461+ π docs: add troubleshooting section
462+ π docs(inputs): document all input parameters
463+ π docs(outputs): document all output values
464+ ```
465+
466+ #### Distribution & Versioning
467+ ```
468+ βοΈ setup: configure automated release process
469+ βοΈ setup(build): optimize action bundle size
470+ π release: version 1.0.0 stable release
471+ π release: tag v2 for breaking changes
472+ β chore(deps): update action dependencies
473+ ```
474+
475+ #### Testing & Quality
476+ ```
477+ π§ͺ test: add end-to-end tests with real workflows
478+ π§ͺ test(unit): test action logic with various inputs
479+ π security: validate and sanitize user inputs
480+ β chore: update action to use node 20
481+ ```
482+
483+ ---
484+
485+ ## AI Integration
486+
487+ Copy these templates to integrate Clean Commit with AI coding assistants.
488+
489+ ### GitHub Copilot
490+
491+ Copy [ ` examples/copilot.instructions.md ` ] ( examples/copilot.instructions.md ) to your project:
492+
493+ ``` bash
494+ mkdir -p .github/instructions
495+ curl -o .github/instructions/copilot.instructions.md https://raw.githubusercontent.com/wgtechlabs/clean-commit/main/examples/copilot.instructions.md
496+ ```
497+
498+ ### AI Agents (Codex, Claude, Cursor, Windsurf, etc.)
499+
500+ Copy [ ` examples/AGENTS.md ` ] ( examples/AGENTS.md ) to your project root:
501+
502+ ``` bash
503+ curl -o AGENTS.md https://raw.githubusercontent.com/wgtechlabs/clean-commit/main/examples/AGENTS.md
504+ ```
505+
506+ ### Real-World Implementation
507+
508+ - [ wgtechlabs/nuvex] ( https://github.com/wgtechlabs/nuvex/blob/main/.github/instructions/clean_commit.instructions.md )
509+
510+ ---
511+
192512## Learn More
193513
194514- π [ ** SPECIFICATION.md** ] ( SPECIFICATION.md ) - Full technical specification with detailed guidelines
195515- π [ ** QUICK-REFERENCE.md** ] ( QUICK-REFERENCE.md ) - Single-page cheatsheet for quick lookup
196- - π‘ [ ** examples/EXAMPLES.md** ] ( examples/EXAMPLES.md ) - Real-world examples by project type
197516
198517---
199518
0 commit comments