A powerful web-based code editor that integrates seamlessly with Google Drive™. Côté brings professional code editing capabilities directly into your Google Drive™ workflow, allowing you to edit code files without leaving your browser.
- Google Drive™ Integration: Open and edit files directly from your Google Drive™
- Professional Code Editor: Powered by Monaco Editor (same engine as VS Code)
- Smart File Management: Star, organize, and manage your code files within Google Drive™
- Auto-Save: Automatic saving and syncing with Google Drive™
- Theme Support: Light and dark themes that respect your system preferences
- Syntax Highlighting: Full support for multiple programming languages
- Code Completion: Intelligent code suggestions and completions
- Direct File Operations: Rename and manage files without leaving the editor
Côté integrates with Google Drive using the state parameter approach described in the Google Drive API documentation.
When opening a file from Google Drive, the URL will include a state parameter with the following format:
/file?state={"ids":["FILE_ID"],"action":"open","userId":"USER_ID"}
This approach enables seamless integration with Google Drive's UI, allowing Côté to appear as an option in the "Open with" menu for supported file types.
When receiving a state parameter, Côté follows these steps:
- Verifies that the action field has a value of "open" and the ids field is present
- Uses the userId value to create a new session for the user or switch accounts if needed
- Uses the files.get method to check permissions, fetch file metadata, and download content
The backend API must support the following endpoints for proper state parameter handling:
/api/auth/user
- Returns information about the currently logged-in user/api/auth/logout
- Logs out the current user/api/drive/files/:id
- Gets file metadata and content
- Create new files directly from the editor
- Full-featured header menu (File, Edit, etc.)
- Profile features including account switching and sharing
- OAuth & Store Listing Verification: Currently working through Google's verification process to make Côté available directly in Google Drive™.
Before you begin, ensure you have the following installed:
- Node.js (Latest LTS version recommended)
- npm (comes with Node.js)
- Docker (optional, for containerized development)
- Docker Compose (optional, for containerized development)
-
Clone the repository:
git clone https://github.com/yourusername/cote.git cd cote
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
The application will be available at http://localhost:5173
- Build and start the containers:
The application will be available at http://localhost:5173
docker compose up --build
npm run build
docker build -t cote .
For cross-platform builds (e.g., building for amd64 on an M1 Mac):
docker build --platform=linux/amd64 -t cote .
npm run dev
- Start development servernpm run build
- Build for productionnpm run lint
- Run ESLintnpm run preview
- Preview production build
cote/
├── src/ # Source files
├── public/ # Static assets
├── nginx/ # Nginx configuration
├── .github/ # GitHub configuration
├── Dockerfile # Docker configuration
├── compose.yaml # Docker Compose configuration
└── ...config files
- 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 terms of the license included in the repository.