Stocker is a cool web app that uses AI to help you visualize stock trends and snag some $$ for your portfolio. Weβve (as in me and Vercel screaming at me for the node files being >250mb) trimmed down the backend to make it super light and serverless-friendly, so itβs always fast and ready for you!
I decided I was going to add a portfolio thingy so that was what i did. dont rlly feel like adding a whole synopsis so ples dont grill me :(.
I also founded out that you can make the model go faster by using the actual node package.. huh the more you know. so that was kinda what i did for like an hour smh.
I toyed around with it mostly and added some QOL (quality of life) additions to make it easier to exist with.
Log in to leave a comment
Worked on this cool website that predict stock flows. as you can see you can now stalk stocks! Choose when to buy but know⦠it wont be accurate smh
Im gonna work on accuracy soon, want to implement a portfolio which i will do. :)
Since i will prolly ship this soon i want to go over the process i did to build this:
Init
ββ’ Install dependencies: React, Next.js, TypeScript, ESLint, PostCSS, and any libraries for stock prediction (e.g., TensorFlow.js, mathjs, or custom logic).
Developed the Project Structure & Configuration
ββ’ Set up global styles in src/app/globals.css.
ββ’ Adjust next.config.ts and tsconfig.json for custom settings
Implemented Stock Prediction Logic
ββ’ In src/lib/stockPredictor.ts, I wrote the core logic for predicting stock prices.
βββ This involved all of the statistical models, machine learning, and simple heuristics.
βββ I exported a function that takes input and returns predictions.
Created the API Route
ββ’ In src/app/api/predict/route.ts, i defined the Next.js API route.
βββ Accepts POST requests with stock data or parameters in the request body.
βββ Calls the prediction function from stockPredictor.ts.
βββ Returns the prediction result as a JSON response.
Built the Frontend
ββ’ In src/app/page.tsx, I created the main UI:
βββ Added a form for users to input stock symbols or data.
βββ when the user submits, the website sends a request to the /api/predict endpoint.
βββ website then displays the prediction result to the user.
Layout and Navigation
ββ’ Used layout.tsx to define the root layout as usual.
Log in to leave a comment