A modern content management and sharing platform that allows users to organize, manage, and share their favorite content including Twitter posts, YouTube videos, and text notes.
- User Authentication: Secure sign up and sign in with JWT-based authentication
- Content Management: Create, edit, and delete content items
- Multiple Content Types: Support for Twitter links, YouTube videos, and text notes
- Content Filtering: Filter content by type (All, Twitter, YouTube, Text)
- Search Functionality: Search through your content collection
- Shareable Links: Generate shareable links to showcase your content collection
- Demo Mode: Try the platform with a demo account
- Responsive Design: Fully responsive UI that works on desktop and mobile devices
- Modern UI: Beautiful interface built with Tailwind CSS and Framer Motion animations
- Error Handling: Comprehensive error boundary for graceful error handling
- React 19 - UI library
- TypeScript - Type safety
- Vite - Build tool and dev server
- React Router DOM - Client-side routing
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library
- Axios - HTTP client
- React Icons - Icon library
- React Social Media Embed - Social media embed components
- Node.js - Runtime environment
- Express - Web framework
- TypeScript - Type safety
- MongoDB - Database
- Mongoose - MongoDB object modeling
- JSON Web Token (JWT) - Authentication
- CORS - Cross-origin resource sharing
CEREBRO/
βββ Brainly Frontend/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ ui/ # UI components (Card, Sidebar, Modal, etc.)
β β βββ pages/ # Page components
β β βββ hooks/ # Custom React hooks
β β βββ icons/ # Icon components
β β βββ App.tsx # Main app component
β β βββ main.tsx # Entry point
β βββ package.json
β βββ vercel.json # Vercel deployment config
β
βββ Brainly Backend/ # Express backend API
βββ src/
β βββ index.ts # Main server file
β βββ db.ts # Database models
β βββ middleware.ts # Authentication middleware
β βββ config.ts # Configuration
β βββ utils.ts # Utility functions
βββ package.json
- Node.js (v18 or higher)
- npm or yarn
- MongoDB (local or cloud instance like MongoDB Atlas)
-
Clone the repository
git clone <repository-url> cd CEREBRO
-
Install Frontend Dependencies
cd "Brainly Frontend" npm install
-
Install Backend Dependencies
cd "../Brainly Backend" npm install
-
Create a
.envfile in theBrainly Backenddirectory:MONGODB_URI=your_mongodb_connection_string JWT_PASSWORD=your_jwt_secret_key
-
Update CORS origin in
Brainly Backend/src/index.tsif needed:app.use(cors({ origin: "http://localhost:5173", // For local development credentials: true }));
- Create a
.envfile in theBrainly Frontenddirectory:VITE_BACKEND_URL=http://localhost:3000
cd "Brainly Backend"
npm run devThe backend server will run on http://localhost:3000
cd "Brainly Frontend"
npm run devThe frontend will run on http://localhost:5173 (or the port Vite assigns)
POST /api/v1/signup- Register a new userPOST /api/v1/signin- Sign in and get JWT token
GET /api/v1/content- Get all content for authenticated userPOST /api/v1/content- Create new contentPUT /api/v1/content/:id- Update content by IDDELETE /api/v1/content- Delete content
POST /api/v1/brain/share- Generate or remove shareable linkGET /api/v1/brain/:shareLink- Get shared content by hash
- Sign Up: Create a new account or use the demo mode
- Sign In: Log in with your credentials
- Dashboard: View and manage your content
- Create Content: Add Twitter links, YouTube videos, or text notes
- Filter & Search: Use filters and search to find specific content
- Share: Generate a shareable link to showcase your collection
- Edit/Delete: Manage your content items
The frontend is configured for Vercel deployment. The vercel.json file handles routing configuration.
- Push your code to GitHub
- Import the project in Vercel
- Set environment variables:
VITE_BACKEND_URL- Your backend API URL
- Deploy
Deploy the backend to your preferred hosting service (Heroku, Railway, Render, etc.):
- Set environment variables:
MONGODB_URIJWT_PASSWORD
- Update CORS origin to match your frontend URL
- Build and start:
npm run build npm start
- Passwords are currently stored in plain text. Consider implementing password hashing (e.g., bcrypt) for production use
- JWT tokens are stored in localStorage. Consider using httpOnly cookies for enhanced security
- Ensure CORS is properly configured for production
- Validate and sanitize all user inputs
- Implement password hashing
- Add input validation (e.g., Zod)
- Add tags functionality
- Implement content categories
- Add user profile management
- Add content export functionality
- Implement rate limiting
- Add unit and integration tests
ISC
Contributions are welcome! Please feel free to submit a Pull Request.
For questions or support, please open an issue in the repository.
Built with β€οΈ using React, Express, and MongoDB