Vision CodeCrafter 2.0 is a full-stack finance / investing dashboard that combines a modern React UI with a Node/Express API and a PostgreSQL database.
What you can do
- Sign up / log in with cookie-based JWT authentication
- Access role-based dashboards (User vs Admin)
- View stock-related screens (including stock symbol detail pages)
- Perform buy/sell transactions that update balance and create transaction history records
- View estimated profits based on your transactions vs current asset prices
- Generate and download an Investment Report PDF for a user
- Fetch intraday stock data via an API proxy to Alpha Vantage
A full-stack finance / investing dashboard application:
- Client: React (Vite) + Redux Toolkit + redux-persist + Tailwind
- Server: Node.js + Express
- Database: PostgreSQL
- Auth: JWT stored in an HTTP-only cookie
- Integrations: Alpha Vantage stock intraday data
- Extras: Generates an Investment Report PDF
Live site (as configured in repo metadata): https://vision-codecrafter20.vercel.app
client/— React app (Vite)server/— Express API
- Node.js (LTS recommended)
- npm
- PostgreSQL database
# Frontend
cd client
npm install
# Backend
cd ../server
npm installCreate server/.env with at least:
# Auth
JWT_SECRET=your_secret
# Alpha Vantage
ALPHA_VANTAGE_API_KEY=your_api_key
# Postgres connection
PGHOST=...
PGPORT=5432
PGDATABASE=...
PGUSER=...
PGPASSWORD=...Configure your API base URL if your client code expects it (check client/.env in this repo).
cd server
node server.js
# Server runs on http://localhost:3000cd client
npm run dev
# Vite dev server typically runs on http://localhost:5173Base URL: http://localhost:3000
POST /api/user/registerPOST /api/user/login(setsjwttokencookie)POST /api/user/logoutPUT /api/user/update/:user_id(JWT protected)DELETE /api/user/delete/:user_id(JWT protected)PUT /api/user/balance
POST /api/price/buy— records BUY transaction and decreases balancePOST /api/price/sell— records SELL transaction and increases balanceGET /api/price/profits/:userId— estimated profit per asset
GET /api/investments/generate-pdf?user_id=...— downloads a PDF report
GET /api/stock/:symbol— proxies Alpha Vantage intraday data
Public:
/landing/login,/signup/dashboard
User (role-based protected):
/userdetails/stock,/stock/:stockSymbol/mutualfunds,/bonds,/insurance,/explore
Admin (role-based protected):
/admin/dashboard/admin/user/admin/details
These are based on the current codebase:
server/routes/assetRoutes.jsexists (CRUD) but is not mounted inserver/server.js, so those endpoints are not reachable unless you addapp.use('/api/assets', assetRoutes).- In
server/controllers/userscontroller.js,updateUserreadsreq.params.idbut the route is defined as:user_id. server/models/investmetModel.jscallspool.query(...), butserver/config/db.jsexports{ query }.
No license file is currently included. Add a LICENSE and update this section.