Backend API untuk platform video clipper AI yang memungkinkan users untuk mengubah video panjang menjadi clips pendek yang engaging, mirip seperti OpusClip atau Vizard AI.
- AI Video Analysis - Analisis konten video untuk highlight detection
- Auto Transcription - Speech-to-text dengan AI
- Smart Clipping - Generate clips berdasarkan engagement potential
- Subtitle Generation - Auto-generate subtitle untuk clips
- Multi-format Export - Support berbagai format output
- Turso Database - SQLite-compatible database dengan edge replication
- Authentication - Access tokens untuk API security
- AdonisJS 6 - Modern Node.js framework
- Turso Database - Edge SQLite database
- TypeScript - Full type safety
- AI Integration - Ready for OpenAI, AWS services
- Cloud Storage - S3-compatible storage integration
# Clone atau download project
cd pocat.io
# Install dependencies dengan pnpm
pnpm install
# Setup environment variables
cp .env.example .env
# Edit .env dan tambahkan Turso credentials:
# DATABASE_URL=your_turso_database_url
# DATABASE_AUTH_TOKEN=your_turso_auth_token# Run migrations ke Turso database
pnpm exec node ace migrate:turso
# Test koneksi Turso
pnpm exec node ace test:turso# Development mode
pnpm run dev
# Production build
pnpm run build
cd build
pnpm i --prod
node bin/server.jsGET /- API information dan available endpointsGET /test-turso- Test Turso database connectionPOST /create-table- Create test table
GET /users- Get all usersPOST /users- Create new userGET /users/:id- Get user by IDPUT /users/:id- Update userDELETE /users/:id- Delete user
curl -X POST http://localhost:3333/users \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "john@example.com",
"password": "password123"
}'curl http://localhost:3333/userscurl http://localhost:3333/users/1curl -X PUT http://localhost:3333/users/1 \
-H "Content-Type: application/json" \
-d '{
"name": "John Updated",
"email": "john.updated@example.com"
}'curl -X DELETE http://localhost:3333/users/1hello-world/
βββ app/
β βββ controllers/
β β βββ tests_controller.ts # Test endpoints
β β βββ users_controller.ts # Users CRUD API
β βββ services/
β βββ turso_service.ts # Turso database service
βββ commands/
β βββ migrate_turso.ts # Turso migration command
β βββ test_turso.ts # Turso connection test
βββ config/
β βββ database.ts # Database configuration
βββ start/
β βββ routes.ts # API routes definition
βββ .env # Environment variables
Project ini menggunakan custom service untuk integrasi langsung dengan Turso:
// app/services/turso_service.ts
import { createClient } from '@libsql/client'
class TursoService {
async execute(sql: string, params?: any[]) {
return await this.client.execute({
sql,
args: params || [],
})
}
async batch(statements: Array<{ sql: string; args?: any[] }>) {
return await this.client.batch(statements)
}
}# Test Turso connection
pnpm exec node ace test:turso
# Run Turso migrations
pnpm exec node ace migrate:turso
# Start development server
pnpm run dev
# Build for production
pnpm run build
# Run tests
pnpm run test
# Lint code
pnpm run lint
# Format code
pnpm run format- Edge Database - Turso menyediakan SQLite database dengan replikasi global
- Low Latency - Database edge locations untuk performa optimal
- Scalable - Auto-scaling berdasarkan usage
- Cost Effective - Pay per request model
- Developer Friendly - SQLite syntax yang familiar
# Server Configuration
TZ=UTC
PORT=3333
HOST=localhost
LOG_LEVEL=info
APP_KEY=your_app_key
NODE_ENV=development
# Turso Database
DATABASE_URL=libsql://your-database-url
DATABASE_AUTH_TOKEN=your_auth_token- Fork the project
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License.