Update v1.1 - Enterprise Grade Update
In this major infrastructure update, we've rewritten the "heart" of Atlas Shop. The bot is no longer just a local script; it now uses an Agnostic Data Architecture, allowing infinite scalability for large servers. And the best part: we did all this without changing your customers' visual experience!
What's New?
Multi-Database Support: The bot is no longer tied to SQLite! The system now natively supports 2 of the biggest providers on the market:
- SQLite: (Default) Perfect for small to medium stores. Fast and requires no configuration.
- MySQL: Ideal for integrations with external websites and web panels (Dashboards).
Data Migration System (CLI): We've created a safe command-line tool for those who already have their store running. Now you can migrate all your products, coupons, and stock from SQLite straight to MongoDB/MySQL with just one command, without losing any data.
Health Check Service: The bot now verifies database connection integrity before booting up and performs a "Graceful Shutdown" when closing, ensuring no carts or sales are corrupted during your VPS restarts.
Technical Improvements (Under the Hood)
- Design Pattern Implemented: We introduced the Factory pattern and the Adapters layer. Now, the bot identifies the chosen database in the
.envand builds the connection automatically.- Backwards Compatibility: All this complex rework was done without breaking or altering a single slash command (/shop, /create_product) or visual interface. The entire interface layer (Discord Front-end) remains identical and 100% functional.
- TypeScript Update: Strict typing and compatibility with the latest Discord.js v14 syntax policies.
How to Update Your Store (Installation Guide)
- Download the new version and replace the old files.
- Run npm install in your terminal again to download the new drivers (mysql2, mongodb).
- In your
.envfile, add the new control variable:
Code:DB_PROVIDER=sqlite # Options: sqlite, mysql, mongo- Want to migrate your database? Change the
.envto your newly chosen provider (e.g., mongo) and run:
- npm run migrate:dry (To test the connection and make a JSON backup of your products).
- npm run migrate:run (To permanently transfer the data to the new database).
