Project Info
💡
Inspiration
In regions like Rajshahi, Bangladesh, micro-entrepreneurs—ranging from seasonal mango orchard owners to local boutique operators—face an alarming 80% failure rate within their first year. They don't fail due to lack of grit; they fail due to a lack of strategic foresight, financial literacy, and immediate crisis management. While enterprise corporations have access to seasoned CFOs, legal teams, and market analysts, micro-business owners operate in total isolation. MicroMentor was born out of a single question: What if a local street vendor or small agro-business could afford a Fortune 500-level Board of Directors for free? Our mission is to democratize high-level business intelligence by combining Agentic AI workflows, native bilingual support (English & Bengali), and accessible low-latency architectures. 🏗️ How We Built It MicroMentor was engineered from the ground up using a Hub-and-Spoke architecture on Next.js 14, paired with Supabase for secure data isolation and real-time state management. ⚡ Powered by OpenAI Codex & GPT-5.6 Codex as the Execution Engine: We adopted a Pre-planned Prompt Architecture methodology. Instead of typing vague queries, we drafted structured system specifications locally and passed them to OpenAI Codex. Codex handled ~80% of our frontend Glassmorphism UI components, Tailwind styling, and Next.js API routing setup, drastically accelerating development. Dynamic Model Routing ($GPT\text{-}5.6$): To deliver deep reasoning without frustrating latency, we implemented a dynamic router between the GPT-5.6 model family based on task complexity: $GPT\text{-}5.6\text{-}Luna$ (Deep Reasoning): Powers our multi-agent War Room (AI Board of Directors), SOS Crisis Manager, and Legal Desk where zero-shot accuracy and complex trade-off evaluation are required. $GPT\text{-}5.6\text{-}Mini$ (Flash Execution): Powers low-latency daily utilities such as AI Khata (Voice-to-Ledger), Smart SMS, and Customer Roleplay. 🧮 Model Routing & Latency Optimization Formula To optimize the balance between execution speed and intelligence quality, we defined the routing decision utility function $U(M)$ for selecting model $M \in {\text{Luna}, \text{Mini}}$ given a user request $R$: $$U(M) = w_1 \cdot \text{ReasoningDepth}(R, M) - w_2 \cdot \text{Latency}(M) - w_3 \cdot \text{Cost}(M)$$ Where weights $w_1, w_2, w_3$ dynamically shift depending on whether the feature is real-time interactive (e.g., chat) or deep analytical (e.g., legal drafting). 🚧 Challenges We Faced Latency vs. User Perception: Deep multi-agent reasoning in the AI Board of Directors takes processing time. To prevent user drop-off, we built an Agentic Streaming UI that displays real-time thought logs ("Analyzing supply chain...", "Consulting Financial Advisor...") to mask execution latency smoothly. Bilingual Context Precision: Translating complex business logic into localized Bengali without losing technical context (e.g., profit margin calculations or partnership clauses) required fine-tuning system prompts and structured JSON outputs. Push Protection & Security: Managing secrets while maintaining rapid git cycles during the hackathon forced us to implement strict pre-commit verification workflows. 📚 What We Learned AI as a Pair Programmer: Using OpenAI Codex with strict architectural constraints yields production-grade code in minutes rather than hours, provided the developer designs the system boundaries first. Designing for Micro-Users: True accessibility isn't just about dark mode or glassmorphism—it’s about enabling voice inputs, native regional language understanding, and actionable, one-click execution plans. 🚀 What's Next for MicroMentor WhatsApp & SMS Bot Integration: Allowing vendors to update their ledger and query their AI Co-Founder via basic feature phones without requiring continuous internet access. Localized Logistics Integration: Connecting local transport systems directly with the Autonomous Lead Sniper to automate supply chain fulfillment.
🚀 MicroMentor: The Enterprise-Grade AI Co-Founder for Micro-Entrepreneurs
MicroMentor is an advanced, multi-modal, agentic AI platform designed to democratize enterprise-level business intelligence for micro-entrepreneurs. It acts as a 24/7 AI Co-Founder, Business Strategist, and Legal/Financial Advisor.
⚠️ The Problem: The "Death Valley" of Micro-Businesses
Across the globe, particularly in developing economies like Bangladesh, 80% of micro-businesses shut down within their first year. Why?
- Financial Illiteracy: Founders don't understand cash flow, burn rate, or ledgers.
- Lack of Strategy: Decisions are made on gut feelings, not data or market trends.
- Resource Scarcity: Hiring a marketing agency, a corporate lawyer, or a business consultant is financially impossible.
- Language & Tech Barriers: Existing enterprise tools (like Salesforce or SAP) are too complex, expensive, and English-only.
💡 The Solution: MicroMentor
MicroMentor bridges this massive gap by providing a Bilingual (English & Bengali), Mobile-first, Hub-and-Spoke Ecosystem. We utilize GPT-5.6, Agentic Workflows, RAG (Live Web Search), and Multi-Modal AI (Sora/DALL-E 3) to give a local mango seller in Rajshahi the same strategic power as a Fortune 500 CEO.
🌟 The 12 "God-Tier" Features (What makes us stand out)
🧠 Agentic Intelligence & Strategy
- ⚖️ Multi-Agent War Room: When facing a crisis, summon an AI Board of Directors. 3 distinct personas (The Conservative CFO, The Aggressive CMO, and The Wise CEO) debate in real-time to provide a balanced verdict.
- 🎯 Autonomous Lead Sniper: Type your product, and the AI autonomously scours the internet, finds 3-4 real-world B2B companies/buyers, and drafts hyper-personalized outreach pitches.
- 🕵️ Live Competitor Spy: Uses real-time DuckDuckGo web scraping to analyze current market prices, find local competitors, and cite verified sources.
💰 Finance & Compliance
- ⏳ Financial Time Machine (Burn-Rate Simulator): An interactive slider that calculates runway. If bankruptcy is imminent (<3 months), it triggers an AI Survival Pivot to save the business.
- 📓 AI Khata (Voice-to-Ledger): Users can simply speak or type messy daily transactions (e.g., "Sold 2 shirts for $20, bought packaging for $5"). The AI structures it into a professional Balance Sheet.
- ⚖️ AI Legal Desk: Drafts court-ready legal documents (Partnership Deeds, NDAs, Trade License forms) customized to the specific business, ready to print.
🚀 Marketing & Media
- 🎬 Viral Marketing Studio: Generates cinematic prompt engineering (camera angles, lighting, psychological hooks) for 30-sec viral reels and graphic posts.
- 🪄 End-to-End Media Generator (FAB): A smart Floating Action Button integrated with DALL-E 3 and OpenAI Sora. It maintains "Consistent Brand Characters" across sequential video generations directly within the app.
- 💬 Smart SMS Communicator: Drafts professional B2B/B2C texts for difficult scenarios (e.g., angry customer apologies, supplier negotiations).
🔮 Data & Ecosystem
- 🔮 Predictive Radar: Generates a 12-month local trend and seasonality heatmap based on geographic location and weather patterns, providing pre-emptive tasks.
- 🚚 Supply Chain Matchmaker: Finds real-world wholesale markets and suppliers using live web search, providing negotiation tips.
- 🔊 The Mentor's Voice & Bilingual Core: OpenAI TTS integration with a 100% lightweight bilingual architecture (
?lang=bn) for deep local penetration.
Section Title: 🛠️ Development Workflow: How I Used Codex & GPT-5.6
As a developer with a background in Full-Stack Engineering and Data Structures, I knew that relying on AI blindly leads to spaghetti code and excessive DOM bloat. Therefore, I treated OpenAI Codex not just as a chatbot, but as an execution engine.
Instead of writing vague queries in the Codex prompt box, I adopted a strict 'Pre-planned Prompt Architecture' methodology. Here is my exact workflow:
System Design First: Before writing a single line of code, I mapped out the entire Next.js 14 App Router structure, the Hub-and-Spoke architecture, and the Supabase database schema offline.
Offline Prompt Drafting: To ensure zero-shot success and avoid wasting context windows, I drafted highly structured, detailed prompts in my local code editor first. I explicitly defined the UI requirements (Glassmorphism, Tailwind), routing logic, and state management rules in these text files.
Codex Execution: I then pasted these hyper-structured prompts into Codex. This is why my Codex session logs show large, well-formatted prompt pastes. Codex acted as my senior pair-programmer—it took my architectural instructions and rapidly generated the modular components, drastically cutting down my frontend UI development time by 80%.
GPT-5.6 for the 'Brain': While Codex built the body (the app), I integrated GPT-5.6-Luna and GPT-5.6-Mini via API to act as the 'brain'. I used Luna for heavy, multi-agent reasoning (like the War Room and SOS Crisis) and Mini for low-latency tasks (like AI Khata and Smart SMS).
Human-in-the-Loop Refinement: After Codex generated the initial codebase, I manually refined the routing middleware, fixed Next.js hydration issues, and polished the bilingual (English/Bengali) translation logic to ensure a seamless UX.
🏗️ System Architecture
We implemented a "Hub and Spoke" Architecture to prevent DOM Bloat and ensure extreme performance on low-end devices:
- The Hub: A sleek, gamified Dashboard (
/dashboard) acting as the AI Command Center. - The Spokes: Isolated Next.js routes (
/radar,/war-room,/legal-desk) for heavy AI tools, ensuring zero latency on the main dashboard. - Agentic Streaming UI: Masks API latency with dynamic "thought-process" loading states (e.g., Deploying AI Agent... -> Fetching local data...).
💻 Tech Stack
- Frontend: Next.js 14 (App Router), React, Tailwind CSS, Lucide Icons, Canvas-Confetti (Magic moves).
- Backend: Next.js Route Handlers (API).
- AI & ML: OpenAI SDK (
gpt-5.6,gpt-5.6-mini,dall-e-3,soraconcept), Web Speech API. - Search/RAG: DuckDuckGo Web Scraper Utility.
- Database: Supabase (PostgreSQL) with JSONB structures.
🚀 Installation & Local Setup
Prerequisites
- Node.js (v18.x or later)
- An OpenAI API Key (with GPT-5.6 access)
- A Supabase Project
1. Clone the Repository
git clone [https://github.com/your-username/micro-mentor.git](https://github.com/your-username/micro-mentor.git)
cd micro-mentor
2. Install Dependencies
Bash
npm install
# or
yarn install
3. Setup Environment Variables
Create a .env.local file in the root directory and add the following keys:
Code snippet
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
OPENAI_API_KEY=your_openai_api_key
4. Database Setup (Supabase SQL Editor)
Run the following SQL commands in your Supabase SQL Editor to set up the necessary tables and JSONB columns:
```sql
-- WARNING: This schema is for context only and is not meant to be run.
-- Table order and constraints may not be valid for execution.
CREATE TABLE public.users (
id uuid NOT NULL,
email text NOT NULL UNIQUE,
created_at timestamp with time zone NOT NULL DEFAULT timezone('utc'::text, now()),
CONSTRAINT users_pkey PRIMARY KEY (id),
CONSTRAINT users_id_fkey FOREIGN KEY (id) REFERENCES auth.users(id)
);
CREATE TABLE public.business_profiles (
id uuid NOT NULL DEFAULT gen_random_uuid(),
user_id uuid NOT NULL,
budget numeric NOT NULL,
business_type text NOT NULL,
created_at timestamp with time zone NOT NULL DEFAULT now(),
CONSTRAINT business_profiles_pkey PRIMARY KEY (id),
CONSTRAINT business_profiles_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth.users(id)
);
CREATE TABLE public.generated_plans (
id uuid NOT NULL DEFAULT gen_random_uuid(),
profile_id uuid NOT NULL,
full_json_response jsonb NOT NULL,
created_at timestamp with time zone NOT NULL DEFAULT now(),
CONSTRAINT generated_plans_pkey PRIMARY KEY (id),
CONSTRAINT generated_plans_profile_id_fkey FOREIGN KEY (profile_id) REFERENCES public.business_profiles(id)
);
CREATE TABLE public.cached_plans (
id uuid NOT NULL DEFAULT gen_random_uuid(),
search_text text NOT NULL,
language text NOT NULL,
embedding USER-DEFINED,
plan_data jsonb NOT NULL,
created_at timestamp with time zone DEFAULT now(),
CONSTRAINT cached_plans_pkey PRIMARY KEY (id)
);
CREATE TABLE public.cached_queries (
id uuid NOT NULL DEFAULT gen_random_uuid(),
query_embedding USER-DEFINED NOT NULL,
response_json jsonb NOT NULL,
language character varying NOT NULL CHECK (language::text = ANY (ARRAY['English'::character varying, 'Bengali'::character varying]::text[])),
CONSTRAINT cached_queries_pkey PRIMARY KEY (id)
);
-- 🔒 SECURITY: Enable Row Level Security (RLS) on all tables
ALTER TABLE public.users ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.business_profiles ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.generated_plans ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.cached_plans ENABLE ROW LEVEL SECURITY;
ALTER TABLE public.cached_queries ENABLE ROW LEVEL SECURITY;
-- 🛡️ POLICIES: Users can only View, Insert, or Update THEIR OWN data
-- For business_profiles
CREATE POLICY "Users can manage their own profiles"
ON public.business_profiles FOR ALL USING (auth.uid() = user_id);
-- For generated_plans (Checking relationship through profile_id)
CREATE POLICY "Users can manage their own plans"
ON public.generated_plans FOR ALL
USING (
profile_id IN (SELECT id FROM public.business_profiles WHERE user_id = auth.uid())
);
- Run the App Bash npm run dev Navigate to http://localhost:3000 to explore the enterprise AI co-founder!
🔮 Future Roadmap (If we had more time) While the current MVP is enterprise-grade, here is what we plan to integrate next to make it a Decacorn SaaS:
Semantic Caching (pgvector): Implementing Supabase pgvector to cache similar GPT-5.6 queries (e.g., identical searches for "Mango Business Rajshahi"), reducing latency to <500ms and cutting API costs by 70%.
WhatsApp Bot Integration: Moving the "AI Khata" and "Smart SMS" directly into a WhatsApp Business Bot, as micro-entrepreneurs spend 90% of their digital time there.
React Native Mobile App: Wrapping the web app into a native mobile experience for offline access to cached data.
Auto-Social Media Poster: Directly connecting the Marketing Studio to Facebook/Instagram Graph APIs to auto-publish generated Reels and Posts.
Built with ❤️ for the Hackathon by QweekOS. Empowering the next generation of micro-entrepreneurs.
Analysis
View
Metric
- 6
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- Next.jsIn code
- OpenAIIn code
- ReactIn code
- SQLIn code
- SupabaseIn code
- Tailwind CSSIn code
- TypeScriptIn code
- JavaScriptClaimed
- Node.jsClaimed
- PostgreSQLClaimed
8 of 11 appear in the indexed code. 3 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
522 KB
Source files
72
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
cryptXploit/MicroBusinessMentor.ai
85 files · 1.0 MB · @ ba4a4ea
Structure
Interface
35 files · 41%Screens, components and styles rendered to the user.
API & routing
27 files · 32%Request entry points: routes, handlers and controllers.
Application logic
6 files · 7%Domain rules, services and shared utilities.
Data & schema
4 files · 5%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript95%
- Markdown2%
- SQL2%
- CSS1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 24- @base-ui/react
- @supabase/supabase-js
- canvas-confetti
- class-variance-authority
- clsx
- lucide-react
- next
- openai
- react
- react-dom
- recharts
- shadcn
- tailwind-merge
- tailwindcss-animate
- tw-animate-css
- +9 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.