How pulengtshaba/sentence-builder works
Sentence Builder is a full-stack app for choosing grammatical word types, assembling words into an in-progress sentence, and saving, viewing, or editing ordered sentences. The Angular builder and saved-sentence views use an API service to reach the Express API; backend controllers delegate to domain services and repositories for word lookup and sentence persistence. The README documents ordered sentence-word storage and the major user capabilities. Database details differ between README and the sampled adapter configuration, so the graph labels the external store generically.
Main entry points: app.js API app and routing · sentence-api.service.ts Sentence API client · database.js Prisma database client · app.routes.ts App shell and routes
Components 21
Angular client
- App shell and routes
client/src/app/app.routes.ts - Sentence builder
client/src/app/features/sentence-builder/sentence-builder.component.ts - Saved sentences
client/src/app/features/saved-sentences/saved-sentences.component.ts - Client data models
client/src/app/models - Sentence API client
client/src/app/services/sentence-api.service.ts
Express API
- API app and routing
server/src/app.js - Sentence routes
server/src/routes/sentenceRoutes.js - Word routes
server/src/routes/wordRoutes.js - Word-type routes
server/src/routes/wordTypeRoutes.js - Sentence controller
server/src/controllers/sentenceController.js - Word controller
server/src/controllers/wordController.js - Word-type controller
server/src/controllers/wordTypeController.js
Sentence and word logic
- Sentence service
server/src/services/sentenceService.js - Word service
server/src/services/wordService.js - Word-type service
server/src/services/wordTypeService.js
Persistence
- Sentence repository
server/src/repositories/sentenceRepository.js - Word repository
server/src/repositories/wordRepository.js - Word-type repository
server/src/repositories/wordTypeRepository.js - Prisma database client
server/src/config/database.js
Other components
- Sentence builder user
- Relational database
Connections 24
- Sentence builder user → App shell and routes: uses
README.md - App shell and routes → Sentence builder: routes to
client/src/app/app.routes.ts - App shell and routes → Saved sentences: routes to
client/src/app/app.routes.ts - Sentence builder → Sentence API client: requests data
client/src/app/features/sentence-builder/sentence-builder.component.ts - Saved sentences → Sentence API client: requests sentences
client/src/app/features/saved-sentences/saved-sentences.component.ts - Sentence API client → Client data models: uses types
client/src/app/services/sentence-api.service.ts - Sentence API client → API app and routing: calls REST API
README.md - API app and routing → Sentence routes: mounts
server/src/app.js - API app and routing → Word routes: mounts
server/src/app.js - API app and routing → Word-type routes: mounts
server/src/app.js - Sentence routes → Sentence controller: dispatches
server/src/routes/sentenceRoutes.js - Word routes → Word controller: dispatches
server/src/routes/wordRoutes.js - Word-type routes → Word-type controller: dispatches
server/src/routes/wordTypeRoutes.js - Sentence controller → Sentence service: delegates to
server/src/controllers/sentenceController.js - Word controller → Word service: delegates to
server/src/controllers/wordController.js - Word-type controller → Word-type service: delegates to
server/src/controllers/wordTypeController.js - Sentence service → Sentence repository: reads and writes
server/src/services/sentenceService.js - Sentence service → Word repository: validates words
server/src/services/sentenceService.js - Word service → Word repository: looks up words
server/src/services/wordService.js - Word-type service → Word-type repository: looks up types
server/src/services/wordTypeService.js - Sentence repository → Prisma database client: queries
server/src/repositories/sentenceRepository.js - Word repository → Prisma database client: queries
server/src/repositories/wordRepository.js - Word-type repository → Prisma database client: queries
server/src/repositories/wordTypeRepository.js - Prisma database client → Relational database: persists records
server/src/config/database.js