Complete step-by-step guide to set up Localine from scratch
Prerequisites • Installation • Database • Configuration • Getting Started
- Prerequisites
- Installation
- Database Setup
- Environment Configuration
- Starting the Application
- Create Your First Account
- API Keys
- Next Steps
- Troubleshooting
- Support
Before you begin, ensure you have the following installed:
| Requirement | Version | Purpose |
|---|---|---|
| Node.js | 18+ | Runtime environment |
| MariaDB | 10.5+ | Database server |
| MySQL | 8.0+ | Alternative database |
| npm | Latest | Package manager |
git clone https://github.com/LocalineServices/web-app.git
cd web-appnpm installNote: The Prisma Client will be automatically generated during npm install via the postinstall script.
Login to MariaDB/MySQL and create the database:
# Login to MariaDB
mysql -u root -p-- Create database with UTF-8 support
CREATE DATABASE localine CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- Exit MySQL
exitCopy the example environment file:
cp .env.example .envEdit .env with your settings:
# Database Configuration
DATABASE_HOST=localhost
DATABASE_PORT=3306
DATABASE_USER=root
DATABASE_PASSWORD=your_password_here
DATABASE_NAME=localine
# JWT Secret (CHANGE IN PRODUCTION!)
JWT_SECRET=your-secret-jwt-key-change-in-production-min-32-chars
# Signups Configuration
SIGNUPS_ENABLED=true
# Node Environment
NODE_ENV=development| Variable | Description | Example | Required |
|---|---|---|---|
DATABASE_HOST |
Database server hostname | localhost |
✅ |
DATABASE_PORT |
Database server port | 3306 |
✅ |
DATABASE_USER |
Database username | root |
✅ |
DATABASE_PASSWORD |
Database password | your_password |
✅ |
DATABASE_NAME |
Database name | localine |
✅ |
JWT_SECRET |
Secret key for JWT tokens (min 32 chars) | random-string |
✅ |
SIGNUPS_ENABLED |
Allow new account creation through web interface and API | true |
❌ |
NODE_ENV |
Environment mode | development / production |
✅ |
.env file to version control!
After configuring your environment variables (next step), run:
npx prisma migrate devThis will create all necessary tables and relationships.
Start the development server with hot reload:
npm run devThe application will be available at:
http://localhost:3000
Build and start the production server:
# Build the application
npm run build
# Start production server
npm start| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm start |
Start production server |
npm run lint |
Run ESLint |
- Open http://localhost:3000
- Click "Sign up"
- Fill in your details:
- Full Name - Your display name
- Email - Valid email address
- Password - Minimum 8 characters
- Click "Create account"
You'll be automatically logged in and redirected to the projects page.
- Click "New Project"
- Enter project details:
- Name - Your project name
- Description - Optional project description
- Click "Create"
Generate API keys for programmatic access to your translations.
- Navigate to Project Settings → API Keys
- Click "Generate New API Key"
- Select a role:
| Role | Permissions | Use Case |
|---|---|---|
| read-only | Fetch translations only | Production apps |
| editor | Add/edit translations and terms | CI/CD pipelines |
| admin | Full project access | Administrative tools |
- Copy the API key (shown only once!)
Make authenticated requests with your API key:
curl -H "Authorization: Bearer tk_your_api_key_here" \
http://localhost:3000/api/v1/projects/:projectId/termsExample - Fetch All Terms:
curl -H "Authorization: Bearer tk_abc123..." \
http://localhost:3000/api/v1/projects/my-project-id/termsNow that Localine is set up, here's what you can do:
- 📖 Read the Documentation - Explore the API documentation
- 🌍 Add Languages - Set up locales for your project
- 📝 Create Terms - Add translation keys
- ✍️ Add Translations - Translate your terms
- 👥 Invite Team Members - Collaborate with your team
- 📥 Import/Export - Bulk manage translations
- 🔗 Integrate - Connect with your application
- 💾 Set Up Backups - Configure automated database backups
Need help? We're here for you!
- Information: README.md
- Issues: GitHub Issues