How owasp/nodegoat works
NodeGoat is an intentionally vulnerable Node.js web application for learning OWASP Top 10 risks. A user enters through the Express web server, signs in or creates an account, then uses authenticated dashboard features such as profile, contributions, benefits, allocations, memos, and research; the tutorial is a separate learning route. Route handlers own feature actions and use data-access objects to persist or retrieve MongoDB records. The graph preserves those documented feature branches and the tutorial. Some DAO-to-route links are supported by the source index; unsampled view wiring and storage details are not expanded beyond explicit evidence.
Main entry points: index.js Route registration · session.js Account sessions · server.js Express server · profile.js Profile handler
Components 21
Web runtime
- Express server
server.js - Route registration
app/routes/index.js - HTML views
app/views
Accounts and sessions
- Account sessions
app/routes/session.js - Profile handler
app/routes/profile.js
Financial features
- Contributions handler
app/routes/contributions.js - Benefits handler
app/routes/benefits.js - Allocations handler
app/routes/allocations.js - Memos handler
app/routes/memos.js
Learning and research
- Research handler
app/routes/research.js - OWASP tutorial
app/routes/tutorial.js
Data access
- User records
app/data/user-dao.js - Profile records
app/data/profile-dao.js - Contribution records
app/data/contributions-dao.js - Benefits records
app/data/benefits-dao.js - Allocation records
app/data/allocations-dao.js - Memo records
app/data/memos-dao.js - Research data
app/data/research-dao.js
Other components
- Web user
- MongoDB
- Stock information service
Connections 26
- Web user → Express server: requests pages
README.md - Express server → MongoDB: connects to
server.js - Express server → Route registration: registers routes
server.js - Route registration → Account sessions: routes account actions
app/routes/index.js - Route registration → Profile handler: routes profile actions
app/routes/index.js - Route registration → Contributions handler: routes contribution actions
app/routes/index.js - Route registration → Benefits handler: routes benefit actions
app/routes/index.js - Route registration → Allocations handler: routes allocation pages
app/routes/index.js - Route registration → Memos handler: routes memo actions
app/routes/index.js - Route registration → Research handler: routes research pages
app/routes/index.js - Route registration → OWASP tutorial: mounts tutorial
app/routes/index.js - Account sessions → User records: authenticates users
app/routes/session.js - Account sessions → Allocation records: prepares allocations
app/routes/session.js - Profile handler → Profile records: reads and updates
app/routes/profile.js - Contributions handler → Contribution records: reads and updates
app/routes/contributions.js - Benefits handler → Benefits records: accesses records
app/routes/benefits.js - Allocations handler → Allocation records: accesses records
app/routes/allocations.js - Memos handler → Memo records: accesses records
app/routes/memos.js - Research handler → Research data: constructs data access
app/routes/research.js - Research handler → Stock information service: fetches stock data
app/routes/research.js - User records → MongoDB: reads and writes
app/data/user-dao.js - Profile records → MongoDB: reads and writes
app/data/profile-dao.js - Allocation records → User records: looks up users
app/data/allocations-dao.js - Account sessions → HTML views: renders account pages
app/routes/session.js - Profile handler → HTML views: renders profile page
app/routes/profile.js - Contributions handler → HTML views: renders contribution page
app/routes/contributions.js