How hubertantoniewicz/cop5818-team10-stocklog works
StockLog is a beginner-investor portfolio tracker. Users add securities and manually maintained prices, record account-labeled buys and sells, then view transaction history and a calculated portfolio summary. The runtime divides into browser pages and shared API helpers, Express routing, portfolio calculations, and SQLite persistence. README-described capabilities are represented even where HTML, schema, and some source were not excerpted; those subsystems are linked only where the excerpts or README support the relationship.
Main entry points: database.js SQLite database · server.js Express server · api.js API helpers · portfolio.js Summary route
Components 13
Browser app
- Dashboard view
public/js/dashboard.js - Transactions view
public/js/transactions.js - Prices view
public/js/prices.js - API helpers
public/js/api.js
REST API
- Express server
server.js - Securities routes
routes/securities.js - Transaction routes
routes/transactions.js - Summary route
routes/portfolio.js
Portfolio domain
- Portfolio calculations
lib/portfolio.js
SQLite storage
- Securities records
routes/securities.js - Transaction records
routes/transactions.js - SQLite database
db/database.js
Other components
- Investor
Connections 16
- Investor → Dashboard view: views
README.md - Investor → Transactions view: records trades
README.md - Investor → Prices view: manages prices
README.md - Dashboard view → API helpers: requests summary
public/js/dashboard.js - Transactions view → API helpers: loads and submits
public/js/transactions.js - Prices view → API helpers: loads and updates
public/js/prices.js - API helpers → Express server: sends JSON
- Express server → Securities routes: mounts
server.js - Express server → Transaction routes: mounts
server.js - Express server → Summary route: mounts
server.js - Securities routes → SQLite database: reads and writes
routes/securities.js - Transaction routes → SQLite database: reads and writes
routes/transactions.js - Summary route → SQLite database: loads prices and trades
routes/portfolio.js - Summary route → Portfolio calculations: calculates summary
routes/portfolio.js - SQLite database → Securities records: stores
routes/securities.js - SQLite database → Transaction records: stores
routes/transactions.js