From f4c11b13f7145be003fd1cc7c8bc4b579bcefa98 Mon Sep 17 00:00:00 2001 From: "Mr. Algorithm" <11aravipratapsingh@gmail.com> Date: Sat, 4 Oct 2025 21:50:00 +0530 Subject: [PATCH] readme file created --- README.md | 313 +++++++++++++++++++++++++++-- public/assets/images/dashboard.png | Bin 276111 -> 276005 bytes 2 files changed, 293 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index e215bc4..bc8283f 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,309 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). +
-First, run the development server: +# OpenStock +OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, set personalized alerts, and explore detailed company insights — built openly, for everyone, forever free. + +Note: OpenStock is community-built and not a brokerage. Market data may be delayed based on provider rules and your configuration. Nothing here is financial advice. + +## 📋 Table of Contents + +1. ✨ [Introduction](#introduction) +2. 🌍 [Open Dev Society Manifesto](#manifesto) +3. ⚙️ [Tech Stack](#tech-stack) +4. 🔋 [Features](#features) +5. 🤸 [Quick Start](#quick-start) +6. 🔐 [Environment Variables](#environment-variables) +7. 🧱 [Project Structure](#project-structure) +8. 📡 [Data & Integrations](#data--integrations) +9. 🧪 [Scripts & Tooling](#scripts--tooling) +10. 🤝 [Contributing](#contributing) +11. 🛡️ [Security](#security) +12. 📜 [License](#license) +13. 🙏 [Acknowledgements](#acknowledgements) + +## ✨ Introduction + +OpenStock is a modern stock market app powered by Next.js (App Router), shadcn/ui and Tailwind CSS, Better Auth for authentication, MongoDB for persistence, Finnhub for market data, TradingView widgets for rich charting, and Inngest for reliable background jobs. It’s designed to be practical for professionals and welcoming for students — no paywalls, no gatekeeping. + +## 🌍 Open Dev Society Manifesto + +We live in a world where knowledge is hidden behind paywalls. Where tools are locked in subscriptions. Where information is twisted by bias. Where newcomers are told they’re not “good enough” to contribute. + +We believe there’s a better way. + +- Our Belief: Technology should belong to everyone. Knowledge should be open, free, and accessible. Communities should welcome newcomers with trust, not gatekeeping. +- Our Mission: Build free, open-source projects that make a real difference: + - Tools that professionals and students can use without barriers. + - Knowledge platforms where learning is free, forever. + - Communities where every beginner is guided, not judged. + - Resources that run on trust, not profit. +- Our Promise: We will never lock knowledge. We will never charge for access. We will never trade trust for money. We run on transparency, donations, and the strength of our community. +- Our Call: If you’ve ever felt you didn’t belong, struggled to find free resources, or wanted to build something meaningful — you belong here. + +Because the future belongs to those who build it openly. + +## ⚙️ Tech Stack + +Core +- Next.js 15 (App Router), React 19 +- TypeScript +- Tailwind CSS v4 (via @tailwindcss/postcss) +- shadcn/ui + Radix UI primitives +- Lucide icons + +Auth & Data +- Better Auth (email/password) with MongoDB adapter +- MongoDB + Mongoose +- Finnhub API for symbols, profiles, and market news +- TradingView embeddable widgets + +Automation & Comms +- Inngest (events, cron, AI inference via Gemini) +- Nodemailer (Gmail transport) +- next-themes, cmdk (command palette), react-hook-form + +Language composition +- TypeScript (~93.4%), CSS (~6%), JavaScript (~0.6%) + +## 🔋 Features + +- Authentication + - Email/password auth with Better Auth + MongoDB adapter + - Protected routes enforced via Next.js middleware +- Global search and Command + K palette + - Fast stock search backed by Finnhub + - Popular stocks when idle; debounced querying +- Watchlist + - Per-user watchlist stored in MongoDB (unique symbol per user) +- Stock details + - TradingView symbol info, candlestick/advanced charts, baseline, technicals + - Company profile and financials widgets +- Market overview + - Heatmap, quotes, and top stories (TradingView widgets) +- Personalized onboarding + - Collects country, investment goals, risk tolerance, preferred industry +- Email & automation + - AI-personalized welcome email (Gemini via Inngest) + - Daily news summary emails (cron) personalized using user watchlists +- Polished UI + - shadcn/ui components, Radix primitives, Tailwind v4 design tokens + - Dark theme by default +- Keyboard shortcut + - Cmd/Ctrl + K for quick actions/search + +## 🤸 Quick Start + +Prerequisites +- Node.js 20+ and pnpm or npm +- MongoDB connection string +- Finnhub API key (free tier supported; real-time may require paid) +- Gmail account for email (or update Nodemailer transport) +- Optional: Google Gemini API key (for AI-generated welcome intros) + +Clone and install ```bash -npm run dev +git clone https://github.com/Open-Dev-Society/OpenStock.git +cd OpenStock + +# choose one: +pnpm install # or -yarn dev -# or -pnpm dev -# or -bun dev +npm install ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +Configure environment +- Create a `.env` file (see [Environment Variables](#environment-variables)) +- Verify DB connectivity: +```bash +pnpm test:db +# or +npm run test:db +``` -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. +Run development +```bash +# Next.js dev (Turbopack) +pnpm dev +# or +npm run dev +``` -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. +Run Inngest locally (workflows, cron, AI) +```bash +npx inngest-cli@latest dev +``` -## Learn More +Build & start (production) +```bash +pnpm build && pnpm start +# or +npm run build && npm start +``` -To learn more about Next.js, take a look at the following resources: +Open http://localhost:3000 to view the app. -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +## 🔐 Environment Variables -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! +Create `.env` at the project root: -## Deploy on Vercel +```env +# Core +NODE_ENV=development -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +# Database +MONGODB_URI=mongodb+srv://;Y{%EUiuoW|y
z--ArGtNG@HyHLHrlLL5eGlHk;5$$SMH&?h!=-P*`mUpP3aeX2E+bhg_cl1wwPQ21E>Y#ZAx_8PpkNgy1kL*WL*#q
zemE)JV^IPh7Ka-)2gR`Pmid3Oq_T@9)8ud16}zUY`ZBd0V#$-7Y+9?
zT>@y>SZ*q<20egXTphPusvjeDQNG_C@?>jXZA1w(aY_DfZwSGG!c}br4Mbr8iCH_C
zW{Dof23o@7)u}IyWy7ud75wf+T2+%hiBL)sV=kSrxcXbQD9Z`gxpU*W4s%+6!|zdr
z>ZshhkXZ19Ayu25+2IMOyU7Qq4fTALwHlR-e1A3SaEz+}ydtD{80EOGl>hTukq!fg
zhRdXXgh<)jdm-qll+Vt^NqMiTK%5jgM`s3!4E0%)e=hsJbYO4E8@6e!f(?EO1!TcT
z-Q2?-Npf>xt^VIi`#KtL%93tXZT&(;J5Mv71lox`)=Ev~(li7fTvhVhT2f_Yc@SQ>{=I
z$E08I9S)a&W0^|zx7G2@vB$w(j}$SP0Fjqw_R>|JD)JC|32l9NIpK4HP}9~fX=bPd
z^M&xMy@O22lt