A modern, responsive note-taking application built with React and Node.js, featuring Google authentication, real-time sync, and enhanced privacy controls.
- Google Authentication - Secure login with Firebase Auth
- Rich Note Management - Create, edit, delete, and organize notes
- Image Support - Upload and attach images to notes
- Privacy Controls - Toggle notes between public and private
- Pin Important Notes - Keep important notes at the top
- Search & Filter - Find notes quickly with search and filters
- Fully Responsive - Beautiful UI on all devices
- Real-time Updates - Instant synchronization
- React 19 with Vite
- TailwindCSS v4 for styling
- Firebase Auth for authentication
- React Router for navigation
- Framer Motion for animations
- Node.js with Express
- MongoDB Atlas (Cloud MongoDB)
- Firebase Admin for authentication
- Cloudinary for image storage
- JWT for session management
-
Clone the repository
git clone <repository-url> cd notebook
-
Configure environment variables
cp .env.example .env
Edit
.env
with your actual values:# Backend MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/notebook JWT_SECRET=your-super-secret-jwt-key FRONTEND_URL=http://localhost:3000 FIREBASE_PROJECT_ID=your-firebase-project-id CLOUDINARY_CLOUD_NAME=your-cloudinary-cloud-name CLOUDINARY_API_KEY=your-cloudinary-api-key CLOUDINARY_API_SECRET=your-cloudinary-api-secret # Frontend VITE_FIREBASE_API_KEY=your-firebase-api-key VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your-firebase-project-id VITE_FIREBASE_STORAGE_BUCKET=your-project.firebasestorage.app VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id VITE_FIREBASE_APP_ID=your-app-id VITE_API_URL=http://localhost:5000/api
-
Start with Docker Compose
docker-compose up -d
This will start:
- Backend API on port 5000
- Frontend on port 3000
- Uses your MongoDB Atlas database
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
-
Create production environment file
cp .env.example .env
-
Update with production values
# Backend MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/notebook JWT_SECRET=your-super-secret-jwt-key-production FRONTEND_URL=https://your-domain.com FIREBASE_PROJECT_ID=your-firebase-project-id CLOUDINARY_CLOUD_NAME=your-cloudinary-cloud-name CLOUDINARY_API_KEY=your-cloudinary-api-key CLOUDINARY_API_SECRET=your-cloudinary-api-secret # Frontend VITE_FIREBASE_API_KEY=your-firebase-api-key VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your-firebase-project-id VITE_FIREBASE_STORAGE_BUCKET=your-project.firebasestorage.app VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id VITE_FIREBASE_APP_ID=your-app-id VITE_API_URL=https://your-api-domain.com/api
-
Deploy with production compose
docker-compose -f docker-compose.prod.yml up -d
Backend Deployment:
- Connect your GitHub repository
- Create a new Web Service
- Set build command:
docker build -t backend ./backend
- Set start command:
docker run -p $PORT:5000 backend
Frontend Deployment:
- Create a new Static Site
- Set build command:
npm run build
- Set publish directory:
dist
- Create new app from GitHub repository
- Configure services:
- Backend: Docker container with health check
- Frontend: Static site with build command
- Set environment variables in DigitalOcean dashboard
- Connect GitHub repository
- Deploy both services separately
- Configure environment variables in Railway dashboard
- Set up custom domains
-
MongoDB Atlas (Cloud)
- Create cluster at https://cloud.mongodb.com
- Get connection string
- Keep credentials secure!
-
Firebase Project
- Enable Authentication with Google provider
- Get project configuration
- Keep API keys secure!
-
Cloudinary Account
- For image upload and storage
- Get API credentials
- Keep API secrets secure!
notebook/
βββ backend/ # Node.js API server
β βββ models/ # Mongoose models
β βββ routes/ # Express routes
β βββ middleware/ # Custom middleware
β βββ config/ # Configuration files
β βββ Dockerfile # Backend Docker image
β βββ package.json
βββ frontend/ # React application
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ contexts/ # React contexts
β β βββ services/ # API services
β β βββ hooks/ # Custom hooks
β βββ public/ # Static assets
β βββ Dockerfile # Frontend Docker image
β βββ nginx.conf # Nginx configuration
β βββ package.json
βββ docker-compose.yml # Development setup
βββ docker-compose.prod.yml # Production setup
βββ .env.example # Template for environment variables
βββ .gitignore # Git ignore rules (includes .env)
βββ README.md
- Code splitting with React Router
- Image optimization with Cloudinary
- Gzip compression in production
- Static asset caching
- Lazy loading of components
Built with β€οΈ by fardinkai