The Isotopes backend application is a RESTful service developed in Rust, designed to manage the inventory of AI modules, raw modules, and machines. It uses sqlx
for database interactions and migrations, and is structured to support efficient CRUD operations and data management.
-
AI Modules Management:
- Create, read, update, and delete AI modules.
- Each AI module has a unique ID, business ID, module ID, and status (active/inactive).
- Timestamps for creation and updates are automatically managed.
- Indexes on
business_id
andmodule_id
for efficient querying.
sql:migrations/20241024051838_create_ai_modules.sql
-
Raw Modules Management:
- Manage raw modules with unique IDs, names, codes, and hosted links.
- Indexed by module name for quick access.
sql:migrations/20241024051839_create_raw_modules.sql
-
Machines Management:
- Handle machine records with unique IDs, names, owners, and associated raw modules.
- Foreign key relationship with raw modules ensures data integrity.
- Indexed by owner and raw module ID.
sql:migrations/20241024051840_create_machines.sql
-
Subscriptions:
- Manage subscriptions with unique UUIDs, emails, names, and subscription timestamps.
sql:migrations/20241013074559_create_subscriptions_table.sql
- Rust and Cargo installed
- PostgreSQL database
sqlx-cli
for managing migrations
-
Clone the repository:
git clone https://github.com/yourusername/isotopes.git cd isotopes
-
Set up the database:
- Ensure PostgreSQL is running.
- Create a database and update the connection string in your
.env
file.
-
Run migrations:
sqlx migrate run
-
Build and run the application:
cargo build cargo run
Run tests using:
cargo test
The project uses GitHub Actions for CI/CD. The workflow includes building the project, running tests, and incrementing the version on successful builds.
This project is licensed under the MIT License.