New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

autosync_backend2

Package Overview
Dependencies
Maintainers
1
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autosync_backend2

A comprehensive business management system built with **Elysia** (TypeScript web framework) and **Bun** runtime. The system provides CRM, inventory management, warehouse operations, fleet management, and company management capabilities.

latest
Source
npmnpm
Version
1.2.106
Version published
Weekly downloads
421
211.85%
Maintainers
1
Weekly downloads
 
Created
Source

Autosync v2

A comprehensive business management system built with Elysia (TypeScript web framework) and Bun runtime. The system provides CRM, inventory management, warehouse operations, fleet management, and company management capabilities.

🚀 Quick Start

Prerequisites

  • Bun runtime (latest version)
  • PostgreSQL database
  • Redis (for caching and sessions)
  • AWS S3 account (for file storage)
  • SMTP credentials (for email)

Installation

  • Clone the repository

    git clone <repository-url>
    cd autosync-v2
    
  • Install dependencies

    bun install
    
  • Set up environment variables

    Create a .env file with the following variables:

    NODE_ENV=development
    PORT=3000
    BETTER_AUTH_SECRET=your-secret-key
    DATABASE_URL=postgresql://user:password@localhost:5432/autosync
    UPSTASH_REDIS_REST_URL=your-redis-url
    UPSTASH_REDIS_REST_TOKEN=your-redis-token
    SMTP_USER=your-smtp-user
    SMTP_PASSWORD=your-smtp-password
    ATUT_TOKEN=your-atut-token
    AWS_ACCESS_KEY=your-aws-key
    AWS_SECRET_KEY=your-aws-secret
    
  • Run database migrations

    bun run db:migrate
    
  • Start the development server

    bun run dev
    
  • Access the application

📚 Documentation

🛠️ Development

Available Commands

# Development
bun run dev              # Start development server with auto-reload
bun run build            # Compile TypeScript and generate declarations

# Database
bun run db:generate      # Generate migration files from schema changes
bun run db:migrate       # Apply database migrations

# Code Quality
bun run biome:check      # Format and lint with auto-fix

# Email Development
bun run email            # Start email template development server

# Testing
bun test                 # Run test suite
bun test:watch           # Run tests in watch mode

Code Standards

  • Indentation: Tabs
  • Quotes: Double quotes
  • Validation: TypeBox (not Zod)
  • Database Naming: Snake_case
  • TypeScript Naming: camelCase

🏗️ Architecture

The application follows a domain-driven architecture with the following main domains:

  • Company Management - Multi-tenant company management with branches, employees, and service packages
  • CRM - Customer relationship management with orders, payments, and service packages
  • Fleet Management - Fleet and machine management with preventive maintenance and inspections
  • Warehouse Management - Inventory and warehouse operations
  • Technical Documentation - Technical documentation for suppliers and vehicle specifications
  • User & Permissions - User authentication and role-based access control

Each domain follows a consistent pattern:

  • index.ts - Route definitions and middleware
  • model.ts - TypeBox validation schemas
  • logic.ts - Business logic and database operations

🗄️ Database

The system uses PostgreSQL with Drizzle ORM and a multi-schema design:

  • public - Core application tables (auth, permissions)
  • crm - Customer relationship management
  • company - Organization management
  • warehouse - Inventory and warehouse operations
  • techdoc - Technical documentation
  • fleet - Fleet management

🔐 Authentication & Authorization

  • Authentication: Better-auth library
  • Authorization: Granular permission system with Redis caching
  • User Kinds: ADMIN, COMPANY_ADMIN, CUSTOMER, EMPLOYEE

📦 Key Technologies

  • Runtime: Bun
  • Framework: Elysia
  • Database: PostgreSQL with Drizzle ORM
  • Authentication: Better-auth
  • Validation: TypeBox
  • Email: React Email
  • Storage: AWS S3
  • Caching: Redis (Upstash)
  • Code Quality: Biome

🐳 Docker

Build and Deploy

# Build and push to ECR
make build

# Build production image
make build_prod

📝 Баазийн бүтэц

🤝 Contributing

  • Follow the code standards and patterns
  • Update documentation when making changes
  • Write tests for new features
  • Use TypeBox for validation
  • Follow the domain-driven structure

📄 License

[Add your license information here]

For detailed documentation, see the docs directory.

FAQs

Package last updated on 05 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts