Skip to content

LocalineServices/web-app

Repository files navigation

Localine Logo

Localine

Next.js TypeScript License: AGPL v3

An open translation management platform for teams

FeaturesTech StackConfigurationUser Management CLILicense


📋 Table of Contents


✨ Features

  • 🔐 User Authentication - Secure signup/login with JWT-based session management
  • 📁 Project Management - Create and manage multiple translation projects
  • 👥 Team Collaboration - Invite team members with role-based access control
  • 🌍 Multi-language Support - Add multiple locales to your projects
  • 📝 Terms & Translations - Manage translation keys and their translations
  • 🔑 API Keys - Generate API keys with role-based permissions
  • 🎨 Modern UI - Beautiful interface built with Radix UI and Tailwind CSS
  • 📊 RESTful API - Complete API for integration with your applications
  • 🔍 Search & Filter - Powerful search and filtering capabilities
  • 📥 Import/Export - Support for multiple translation file formats

🛠️ Tech Stack

Category Technology
Framework Next.js 16 (App Router)
Language TypeScript
Database MariaDB / MySQL
ORM Prisma
UI Components Radix UI
Styling Tailwind CSS
State Management TanStack Query (React Query)
Authentication JWT with httpOnly cookies
API Documentation Swagger/OpenAPI

⚙️ Configuration

Environment Variables

See .env.example for required environment variables:

Variable Description Default Required
DATABASE_HOST Database host localhost
DATABASE_PORT Database port 3306
DATABASE_USER Database user -
DATABASE_PASSWORD Database password -
DATABASE_NAME Database name localine
JWT_SECRET Secret key for JWT tokens (min 32 characters) - ✅ (Production)
SIGNUPS_ENABLED Allow new account creation through web interface and API true

Database Setup

Ensure your database is running and accessible with the credentials specified in your .env file.


📱 User Management CLI

Create User

Create a new user account:

npx tsx scripts/user-cli.ts create-user --email user@example.com --password secretpass123 --name "John Doe"

Options:

  • -e, --email <email> - User email address (required)
  • -p, --password <password> - User password (required, minimum 8 characters)
  • -n, --name <name> - User full name (required)

Example:

npx tsx scripts/user-cli.ts create-user --email admin@company.com --password admin123456 --name "Admin User"

Delete User

Delete a user account by email or ID:

# Delete by email
npx tsx scripts/user-cli.ts delete-user --email user@example.com

# Delete by ID
npx tsx scripts/user-cli.ts delete-user --id 550e8400-e29b-41d4-a716-446655440000

# Force delete without confirmation
npx tsx scripts/user-cli.ts delete-user --email user@example.com --force

Options:

  • -e, --email <email> - User email address
  • -i, --id <id> - User ID (UUID)
  • -f, --force - Skip confirmation prompt

Notes:

  • Either --email or --id must be provided (not both)
  • Deleting a user will also delete all their owned projects and remove them from project memberships
  • Use --force flag for automated scripts to skip confirmation

🚀 Development

Project Structure

src/
├── app/              # Next.js app router pages
│   ├── (auth)/      # Authentication pages
│   ├── (dashboard)/ # Dashboard pages
│   └── api/         # API routes
├── components/       # React components
│   ├── ui/          # UI components (Radix)
│   └── layout/      # Layout components
├── hooks/           # Custom React hooks
└── lib/             # Utility libraries
    ├── auth.ts      # Authentication utilities
    ├── db.ts        # Database utilities
    └── prisma.ts    # Prisma client

Available Scripts

npm run dev         # Start development server
npm run build       # Build for production
npm run start       # Start production server
npm run lint        # Run ESLint

API Documentation

Once the server is running, you can access the API documentation at:

http://localhost:3000/api

📝 License

This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for details.


🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📞 Support

If you encounter any problems or have questions, please open an issue on GitHub.


Made with ❤️ by ItzMxritz & LeonJS_

GitHub

About

An open translation management platform for teams

Resources

License

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •