How yamagutisenior/juice-shop works
OWASP Juice Shop is an intentionally insecure online shop used for security training, demos, CTFs, and security-tool evaluation. The user-facing workflow enters the Angular application and reaches the server; the server initializes shop data and domain models. Training challenges, scoring, and security flaws are a distinct product capability alongside shop features. The supplied excerpts establish only some wiring, so unsampled route and service connections are omitted rather than inferred.
Main entry points: server.ts HTTP server · challengeUtils.ts Challenge tracking and scoring · showProductReviews.ts Product reviews · datacreator.ts Shop data initialization
Components 16
Application entry
- Angular application
frontend/src/app/app.module.ts - Page routing
frontend/src/app/app.routing.ts - Application bootstrap
app.ts - HTTP server
server.ts
Shop domain
- Shop data initialization
data/datacreator.ts - Static shop data
data/staticData.ts - Shop domain models
models - SQLite domain store
models/index.ts - Product reviews
routes/showProductReviews.ts
Security training
- Challenge definitions
data/staticData.ts - Challenge tracking and scoring
lib/challengeUtils.ts - Coding challenges
lib/codingChallenges.ts
Shared platform
- Authentication and security helpers
lib/insecurity.ts - Runtime data cache
data/datacache.ts - Shared utilities
lib/utils.ts
Other components
- Shop user
Connections 16
- Shop user → Angular application: uses
- Angular application → Page routing: routes pages
frontend/src/app/app.module.ts - Application bootstrap → HTTP server: starts
app.ts - HTTP server → Shop data initialization: initializes data
server.ts - HTTP server → SQLite domain store: syncs models
server.ts - HTTP server → Shop domain models: imports models
server.ts - Shop data initialization → Static shop data: loads records
data/datacreator.ts - Shop data initialization → Shop domain models: creates records
data/datacreator.ts - SQLite domain store → Shop domain models: initializes models
models/index.ts - Product reviews → Runtime data cache: reads cache
routes/showProductReviews.ts - Product reviews → Authentication and security helpers: uses helpers
routes/showProductReviews.ts - Product reviews → Shared utilities: uses helpers
routes/showProductReviews.ts - Challenge definitions → Challenge tracking and scoring: tracks solutions
- Challenge tracking and scoring → Runtime data cache: records notifications
lib/challengeUtils.ts - Challenge tracking and scoring → Coding challenges: supports coding
- Challenge tracking and scoring → Shared utilities: uses helpers
lib/challengeUtils.ts