A powerful web application that helps you save, organize, and interact with content from across the web using AI. Built with React, TypeScript, and powered by Groq AI.
- 📝 Smart Content Management: Save and organize Twitter posts, YouTube videos, and custom notes
- 🤖 AI-Powered Chat: Ask questions about your saved content using Groq's LLaMA 3.3 70B model
- 🔍 Intelligent Search: Filter and search through your saved content instantly
- 🔗 Share Your Brain: Generate shareable links to your content collections
- 📱 Fully Responsive: Beautiful mobile and desktop experience
- 🎨 Modern UI: Built with Tailwind CSS and custom components
- 🔐 Secure Authentication: JWT-based auth system
- Framework: React 18 + TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Routing: React Router v6
- HTTP Client: Axios
- Toast Notifications: React Hot Toast
- Hosting: Vercel
- Runtime: Node.js + Express
- Language: TypeScript
- Database: MongoDB + Mongoose
- Authentication: JWT
- AI: Groq SDK (LLaMA 3.3 70B)
- APIs: YouTube API, News API
- Hosting: Render
- Node.js 18+ and npm
- MongoDB instance (local or Atlas)
- API Keys: Groq, YouTube API, News API (optional)
git clone (https://github.com/saad-78/Brainly.git) cd brainly
cd backend
Install dependencies npm install
Create .env file cp .env.example .env
cd frontend
Install dependencies npm install
Create .env file cp .env.example .env
text
Frontend .env Configuration:
VITE_BACKEND_URL=http://localhost:3000
Run frontend npm run dev
The app will be available at http://localhost:5173
POST /api/v1/signup- Register new userPOST /api/v1/signin- User loginGET /api/v1/user- Get current user (protected)
POST /api/v1/content- Add new content (protected)GET /api/v1/content- Get user's content (protected)DELETE /api/v1/content- Delete content (protected)
POST /api/v1/brain/share- Generate shareable link (protected)GET /api/v1/brain/:shareLink- View shared brain (public)
POST /api/v1/note- Create note (protected)GET /api/v1/notes- Get all notes (protected)PUT /api/v1/note/:noteId- Update note (protected)DELETE /api/v1/note/:noteId- Delete note (protected)POST /api/v1/note/:noteId/pin- Pin/unpin note (protected)
POST /api/v1/ai/ask- Ask AI about your content (protected)GET /api/v1/ai/health- Check AI service status
GET /api/v1/health- Server health check (for cron jobs)
- Push code to GitHub
- Create new Web Service on Render
- Connect your repository
- Configure environment variables
- Deploy automatically
Render Environment Variables: MONGODB_URI=your-mongodb-atlas-uri JWT_SECRET=your-jwt-secret GROQ_API_KEY=your-groq-key YOUTUBE_API_KEY=your-youtube-key NEWS_API_KEY=your-news-key PORT=10000 NODE_ENV=production
- Push code to GitHub
- Import project in Vercel
- Set framework preset to "Vite"
- Add environment variable:
VITE_BACKEND_URL=https://your-backend.onrender.com - Deploy
- Groq API: Sign up at console.groq.com
- YouTube API: Get from Google Cloud Console
- News API: Register at newsapi.org
The app is fully responsive with:
- Dynamic viewport units for mobile browsers
- Safe area inset padding for notched devices
- Touch-optimized interactions
- Bottom-positioned toasts on mobile
- Collapsible mobile navigation
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
TypeScript Build Errors: Remove type checking from build In package.json, change "build": "tsc -b && vite build" To: "build": "vite build"
MIT License - feel free to use this project for learning or production.
Built with by Saad
⭐ Star this repo if you found it helpful!