https://github.com/devs-group/driplet
https://github.com/devs-group/driplet
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/devs-group/driplet
- Owner: devs-group
- License: apache-2.0
- Created: 2024-10-21T09:31:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-24T15:51:28.000Z (over 1 year ago)
- Last Synced: 2025-03-29T17:35:40.513Z (about 1 year ago)
- Language: TypeScript
- Size: 497 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Driplet
A comprehensive monorepo containing all Driplet services and components.
## ๐ Overview
Driplet is a complete ecosystem for data capture and processing with these key components:
- **API Service**: Authentication backbone and data ingestion service
- **Scheduler**: Cloud Run-based recurring job processor
- **Chrome Extension**: User-facing browser extension
- **Landing Page**: Public-facing website built with Next.js
## ๐๏ธ Project Structure
```
driplet/
โโโ api/ # Go-based REST API service
โโโ scheduler/ # Go-based Cloud Run scheduler service
โโโ extension/ # Chrome extension (TypeScript/Vue)
โโโ landing/ # Next.js website
โโโ pkg/ # Shared Go packages
```
## ๐ Getting Started
### Prerequisites
- Docker and Docker Compose
- Make (optional, but recommended)
- Node.js and pnpm (for extension and landing page development)
- Go (for direct API/scheduler development)
### Environment Setup
1. Clone the repository
```bash
git clone https://github.com/devs-group/driplet.git
cd driplet
```
2. Copy a `.env.example` file in the root directory and replace required variables
## ๐ ๏ธ Development
### Running the Backend Services
Start all services using Docker Compose:
```bash
docker compose up -d
```
Stop all services:
```bash
docker compose down
```
### Database Management
Run migrations to set up the database schema:
```bash
make migrate
```
Create a new migration:
```bash
make migration name=add_new_table
```
### Extension Development
Navigate to the extension directory:
```bash
cd extension
```
Install dependencies:
```bash
pnpm install
```
Start development server:
```bash
pnpm dev
```
Load the extension in Chrome:
1. Open Chrome and navigate to `chrome://extensions`
2. Enable "Developer mode"
3. Click "Load unpacked" and select the `extension/` folder
Build the extension for production:
```bash
pnpm build
```
### Landing Page Development
Navigate to the landing page directory:
```bash
cd landing
```
Install dependencies:
```bash
pnpm install
```
Start development server:
```bash
pnpm dev
```
Build for production:
```bash
pnpm build
```
## ๐งฉ Architecture
### API Service
The API service handles:
- User authentication (Google OAuth)
- Authorization
- Data ingestion into PubSub topics
- Database access and management
### Scheduler
The scheduler service:
- Runs in Cloud Run environment
- Executes recurring cron jobs
- Processes scheduled tasks
### Chrome Extension
The extension includes:
- Background scripts
- Content scripts
- Popup UI
- Options page
### Data Flow
1. User interactions captured by the Chrome extension
2. Data sent to API service
3. API publishes events to PubSub
4. Scheduler processes events according to defined schedules
## ๐งช Testing
Run backend tests:
```bash
docker compose run --rm api go test ./...
docker compose run --rm scheduler go test ./...
```
## ๐ฆ Deployment
### API and Scheduler
The services are containerized and can be deployed to any container orchestration platform:
- Google Cloud Run
### Extension
1. Build the extension:
```bash
cd extension
pnpm build
```
2. Package files under `extension/`
3. Publish to Chrome Web Store