Skip to content

This project aims to provide independent developers with ready-to-use server functionalities, including Users, License, Text data synchronization etc. 该项目提供给那些独立开发者开箱即用的服务端功能,包括用户管理、许可证和文本数据同步功能等

License

Notifications You must be signed in to change notification settings

Tallone/entry-server

Repository files navigation

Entry-Server

Commits last month Commits last month

Entry-Server is a robust, fully-equipped backend project in Rust that's ready for use. Whether you're an independent developer or part of a small startup team looking to streamline server-side development, this project could be just what you need.

Key Features

  • High performance and strong security measures
  • Lower machine resource usage
  • A well-thought-out project setup, complete with unified response handling, and efficient database and cache usage, among other things
  • A variety of business systems, including a user system, OAuth login/registration, and a license system
  • Designed for easy extension, allowing you to concentrate on developing your unique business logic
  • Simple deployment, with Docker Compose offering a one-click startup solution

API Documents

see here

Method Endpoint
GET /api/v1/license/:license
POST /api/v1/license/:license
GET /api/v1/user
POST /api/v1/user
POST /api/v1/user/login
PATCH /api/v1/user/password
GET /api/v1/user/oauth/:provider
POST /api/v1/user/oauth/:provider
GET /api/v1/sync
POST /api/v1/sync
DELETE /api/v1/sync

Technology Stack

  • Development Language: Rust

  • Web Framework: Axum

  • Database: PostgreSQL with SeaORM

  • Cache: Redis with Fred

How to Run

After cloning the project

  1. Prepare environment variables:

    The project uses dotenv to initialize environment variables, which means you can create a .env file in the project root directory to define variables.

    Here are some necessary environment variables, Do not use the following information in a production environment:

    DATABASE_URL=postgres:https://entry_server:[email protected]:5432/entry
    POSTGRES_DB=entry
    POSTGRES_USER=entry_server
    POSTGRES_PASSWORD=123456
    
    REDIS_URL=redis:https://127.0.0.1:6379
    
    ENTRY_SERVER_ADDR=127.0.0.1:3000
    

    There are also some unnecessary environment variables that you may need when you need some other features.

  2. Prepare the database:

    There is an initialization script in the sql directory, and you need to run it first.

  3. Start service dependencies:

    docker compose -f docker-compose.yaml up -d
    
  4. Run

    cargo run
    

How to Deploy

todo!()

About

This project aims to provide independent developers with ready-to-use server functionalities, including Users, License, Text data synchronization etc. 该项目提供给那些独立开发者开箱即用的服务端功能,包括用户管理、许可证和文本数据同步功能等

Resources

License

Stars

Watchers

Forks

Packages

No packages published