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
.envwith your actual values:# Backend MONGODB_URI=mongodb+srv://username:[email protected]/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:[email protected]/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