DriveNote is a modern note-taking application that seamlessly integrates with Google Drive, allowing users to create, edit, and manage their documents with ease.
- π Secure Google Authentication
- π Rich Text Editor with Google Docs-like features
- π Seamless Google Drive Integration
- π¨ Modern, Responsive UI
- π± Mobile-Friendly Design
- β‘ Real-time Auto-saving
- π Document Search and Filtering
- β Starred Documents
- ποΈ Trash Management
- βοΈ User Settings
- β Help & Support
- React with TypeScript
- Tailwind CSS for styling
- Firebase Authentication
- React Router for navigation
- TinyMCE for rich text editing
- Node.js with Express
- TypeScript
- Google Drive API
- MongoDB for user data
- JWT for authentication
drivenote/
βββ client/ # Frontend React application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ context/ # React context providers
β β βββ lib/ # Utility functions
β β βββ pages/ # Page components
β β βββ types/ # TypeScript type definitions
β βββ public/ # Static assets
βββ server/ # Backend Node.js application
βββ src/
β βββ config/ # Configuration files
β βββ controllers/ # Route controllers
β βββ middleware/ # Custom middleware
β βββ models/ # Database models
β βββ routes/ # API routes
β βββ utils/ # Utility functions
βββ tests/ # Test files
-
AppSidebar
- Main navigation sidebar
- Collapsible design
- Quick access to documents, starred items, and settings
-
TextEditor
- Rich text editor with formatting options
- Auto-save functionality
- Google Docs-like interface
-
Documents
- Document list view
- Search and filter capabilities
- Document actions (edit, delete, star)
-
LoginForm
- Google authentication
- User onboarding
- Error handling
-
User Controller
- User authentication
- Profile management
- Google Drive token management
-
Document Controller
- Document CRUD operations
- Google Drive integration
- Content synchronization
-
Auth Middleware
- JWT verification
- Request authentication
- Error handling
-
Clone the repository:
git clone https://github.com/yourusername/drivenote.git cd drivenote -
Install dependencies:
# Install backend dependencies cd server npm install # Install frontend dependencies cd ../client npm install
-
Set up environment variables:
- Create
.envfiles in bothclientandserverdirectories - Add necessary environment variables (see
.env.examplefiles)
- Create
-
Start the development servers:
# Start backend server cd server npm run dev # Start frontend server cd client npm run dev
VITE_API_BASE_URL=http://localhost:3000
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
VITE_FIREBASE_PROJECT_ID=your_firebase_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id
VITE_FIREBASE_APP_ID=your_firebase_app_id
PORT=3000
MONGODB_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Drive API:
- Navigate to "APIs & Services" > "Library"
- Search for "Google Drive API"
- Click "Enable"
- Create credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Choose "Web application"
- Add authorized redirect URIs (e.g.,
http://localhost:5173) - Save your Client ID and Client Secret
- Add credentials to your
.envfile:GOOGLE_CLIENT_ID=your_client_id GOOGLE_CLIENT_SECRET=your_client_secret
- Go to Firebase Console
- Create a new project or select an existing one
- Enable Authentication:
- Go to "Authentication" > "Sign-in method"
- Enable "Google" sign-in
- Get your Firebase config:
- Go to Project Settings (gear icon)
- Under "Your apps", click the web icon (</>)
- Register your app and copy the config
- Add Firebase config to your
.envfile:VITE_FIREBASE_API_KEY=your_api_key VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id VITE_FIREBASE_APP_ID=your_app_id
- Sign up for a TinyMCE account
- Get your API key from the TinyMCE dashboard
- Install TinyMCE in your project:
npm install @tinymce/tinymce-react
- Add your TinyMCE API key to your
.envfile:VITE_TINYMCE_API_KEY=your_api_key - Initialize TinyMCE in your component:
import { Editor } from '@tinymce/tinymce-react'; const MyEditor = () => { return ( <Editor apiKey={import.meta.env.VITE_TINYMCE_API_KEY} init={{ height: 500, menubar: false, plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'code', 'help', 'wordcount' ], toolbar: 'undo redo | blocks | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' }} /> ); };
For more information, visit: