IGT-first, graph-native tool for endangered/minority language documentation and research
Lexiconnect is a modern web application designed specifically for linguistic researchers working with endangered and minority languages. Built with FastAPI backend and Next.js frontend, it provides comprehensive tools for language documentation, analysis, and preservation.
- Backend: FastAPI (Python) with Neo4j graph database
- Frontend: Next.js (TypeScript) with Tailwind CSS
- Deployment: Docker containers on Google Cloud Platform
- Frontend Hosting: Vercel
- Storage: Google Cloud Storage for file uploads
- Database: Neo4j graph database
- Docker and Docker Compose
- Node.js 18+ and npm
- Google Cloud Platform account
- Vercel account (for frontend deployment)
-
Clone the repository
git clone <repository-url> cd Lexiconnect
-
Start everything with one command
./start-free.sh
This will start:
- FastAPI backend on
http://localhost:8000 - Next.js frontend on
http://localhost:3000 - Neo4j database on
bolt://localhost:7687 - Neo4j Browser interface on
http://localhost:7474
- FastAPI backend on
-
Clone the repository
git clone <repository-url> cd Lexiconnect
-
Set up backend environment
cd backend cp env.example .env # Edit .env with your configuration
-
Start services with Docker Compose
# From project root docker-compose up -dThis will start:
- FastAPI backend on
http://localhost:8000 - Neo4j database on
bolt://localhost:7687 - Neo4j Browser interface on
http://localhost:7474
- FastAPI backend on
-
Set up frontend
cd frontend npm install npm run devFrontend will be available at
http://localhost:3000
# Environment
ENVIRONMENT=development
DEBUG=True
# Neo4j Database
NEO4J_URI=bolt://neo4j:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=password
# JWT
SECRET_KEY=your-super-secret-jwt-key-change-in-production
# Google Cloud Platform
GCP_PROJECT_ID=your-gcp-project-id
GCP_SERVICE_ACCOUNT_FILE=/app/credentials/service-account.json
GCS_BUCKET_NAME=your-bucket-nameNEXT_PUBLIC_API_URL=http://localhost:8000# Install gcloud CLI
gcloud auth login
gcloud projects create lexiconnect-project --name="Lexiconnect"
gcloud config set project lexiconnect-projectgcloud services enable \
run.googleapis.com \
cloudbuild.googleapis.com \
containerregistry.googleapis.com \
compute.googleapis.com \
secretmanager.googleapis.com \
storage.googleapis.comcd gcp/terraform
# Initialize Terraform
terraform init
# Create terraform.tfvars
cat > terraform.tfvars << EOF
project_id = "lexiconnect-project"
region = "us-central1"
neo4j_password = "secure-neo4j-password"
jwt_secret_key = "your-jwt-secret-key"
EOF
# Plan and apply
terraform plan
terraform apply# Create service account
gcloud iam service-accounts create lexiconnect-backend \
--display-name="Lexiconnect Backend Service Account"
# Grant necessary permissions
gcloud projects add-iam-policy-binding lexiconnect-project \
--member="serviceAccount:lexiconnect-backend@lexiconnect-project.iam.gserviceaccount.com" \
--role="roles/storage.admin"
gcloud projects add-iam-policy-binding lexiconnect-project \
--member="serviceAccount:lexiconnect-backend@lexiconnect-project.iam.gserviceaccount.com" \
--role="roles/secretmanager.secretAccessor"
# Download service account key
gcloud iam service-accounts keys create service-account.json \
--iam-account=lexiconnect-backend@lexiconnect-project.iam.gserviceaccount.com
# Move to credentials directory
mkdir -p gcp-credentials
mv service-account.json gcp-credentials/# Build and deploy using Cloud Build
gcloud builds submit --config=gcp/cloudbuild.yaml .npm install -g vercelcd frontend
vercel
# Follow the prompts:
# - Link to existing project or create new
# - Set build command: npm run build
# - Set output directory: .nextIn Vercel dashboard, add environment variables:
NEXT_PUBLIC_API_URL: Your Cloud Run backend URL
vercel domains add your-domain.com
vercel alias your-app.vercel.app your-domain.com# Start all services
docker-compose up -d
# View logs
docker-compose logs -f backend
# Stop services
docker-compose down
# Rebuild backend
docker-compose up -d --build backend# Build production image
docker build -t lexiconnect-backend ./backend
# Run production container
docker run -p 8000:8000 \
-e NEO4J_URI=bolt://your-neo4j-host:7687 \
-e NEO4J_USER=neo4j \
-e NEO4J_PASSWORD=your-neo4j-password \
-e SECRET_KEY=your-production-secret \
lexiconnect-backendComprehensive documentation is available in the docs/ directory:
- Documentation Index - Overview of all documentation
- User Guide - Complete guide for end users
- Developer Guide - Comprehensive developer documentation
- Architecture - System architecture and design
- Setup Guide - Development environment setup
- API Reference - Complete API documentation
- Code Structure - Codebase organization
- Contributing - Contribution guidelines
- Database Schema - Neo4j database structure
- Export System - Export system documentation
- Testing Guide - How to run tests
Lexiconnect/
├── README.md
├── DATABASE.md # Database schema documentation
├── docker-compose.yml
├── start-free.sh # Quick start script
├── backend/
│ ├── Dockerfile
│ ├── requirements.txt
│ ├── main.py
│ ├── app/
│ │ ├── core/
│ │ │ └── config.py
│ │ ├── routers/
│ │ │ ├── auth.py
│ │ │ ├── languages.py
│ │ │ └── documentation.py
│ │ └── database.py
│ └── env.example
├── frontend/
│ ├── package.json
│ ├── next.config.js
│ ├── vercel.json
│ ├── tailwind.config.js
│ └── app/
│ ├── layout.tsx
│ ├── page.tsx
│ ├── globals.css
│ └── providers.tsx
├── docs/ # Documentation
│ ├── README.md
│ ├── user/ # User documentation
│ ├── developer/ # Developer documentation
│ └── *.md # Technical documentation
└── gcp/
├── cloudbuild.yaml
└── terraform/
├── main.tf
├── variables.tf
└── outputs.tf
- Make changes to backend or frontend code
- Test locally using Docker Compose
- Commit changes to your repository
- Deploy backend using Cloud Build
- Deploy frontend using Vercel (automatic on git push)
gcloud logging read "resource.type=cloud_run_revision AND resource.labels.service_name=lexiconnect-backend" --limit 50docker-compose logs -f backend- Use strong passwords for Neo4j and JWT secret
- Enable Neo4j SSL/TLS connections in production
- Use least-privilege IAM roles for service accounts
- Regularly rotate service account keys and Neo4j passwords
- Restrict Neo4j network access to authorized IPs only
- Enable Cloud Armor for DDoS protection
- Use HTTPS in production (handled by Cloud Run and Vercel)
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
-
Neo4j connection failed
- Check NEO4J_URI format (should be bolt://host:7687)
- Ensure Neo4j is running
- Verify credentials (NEO4J_USER/NEO4J_PASSWORD)
- Check firewall rules for ports 7474 and 7687
-
GCP permissions denied
- Check service account permissions
- Verify API enablement
- Ensure correct project ID
-
Frontend API calls failing
- Check NEXT_PUBLIC_API_URL configuration
- Verify CORS settings in backend
- Check network connectivity
- Check the GitHub issues
- Review Docker and container logs
- Verify environment variable configuration
- Test API endpoints directly