Juiced Platform Architecture
Juiced Introduction
Juiced is a multi platform application for online sellers. Juiced allows sellers to easily source, list, and manage their inventory and syncs directly with platforms such as Amazon, eBay, Shopify, StockX, and Facebook Marketplace.
Backend Architecture Overview
Our backend architecture is designed to be robust, scalable, and efficient, leveraging modern technologies and best practices.
Backend Architecture Design
Microservices Architecture
- Api Microservice: Handles user authentication, authorization, and serves as the entry point for client interactions. Implements RESTful APIs for communication.
- Sell Microservice: Manages selling functionality including third party platform integration, inventory management, orders, and transactions, ensuring seamless user experience.
- Monitor Microservice: Integrate Discord Bots that collects latest website information data for our database and manage website integration with our platform.
- Notifier Microservice: Handle push notification, cron jobs and mail service of the application.
All service communicate to each other via Redis Pub/Sub functionality used as message broker and only API microservice is open to the client side.
Data Management
Our backend architecture employs various data management strategies and technologies to ensure reliability, performance, and scalability.
- MySQL on AWS RDS: Hosts the relational database for storing structured data. Provides ACID-compliant transactions and ensures data integrity.
- AWS Elasticsearch: Powers advanced search functionality with support for full-text search and complex queries. Scales horizontally to handle large volumes of data.
- Redis: Acts as a cache to store frequently accessed data and speed up read operations. Facilitates communication between microservices through message queues also used for storing cron and queue related task.
- AWS S3: Used for storing images and user exported data.
Note: The information data in every platform come at fast speed at huge amount for future purpose we are currently looking for option like database sharding & partitioning at the moment. Would like your comments on which strategy we should go with.
Authentication & Authorization: JWT Implementation
Authentication: Our platform verifies user identity through JSON Web Tokens (JWT), ensuring secure access to resources. Upon login, users are issued JWT tokens, which are then used to authenticate subsequent requests.
Authorization: JWT tokens contain encoded user roles and permissions, dictating access levels within the platform. This ensures that only authorized users can perform specific actions and access protected resources.
Integration: JWT tokens are seamlessly integrated into our platform's authentication workflow. They are generated dynamically upon user login and validated for each request, providing a robust mechanism for user authentication and authorization.
Security: Security measures are paramount in our implementation. JWT tokens feature expiration times to mitigate unauthorized access and are transmitted securely over HTTPS to prevent tampering or interception.
Future Enhancements: Looking ahead, we are exploring enhancements such as multi-factor authentication (MFA) to further bolster security and improved token management for better scalability and flexibility.
Frontend Architecture Overview
Our frontend is build with ReactJS, We plan to use the same code base for all our client side applications. Our web app is a Single Page application to provide users with native feel. We publish the same code base for Mobile using PWA, Desktop using electron and it runs natively on web.
Our frontend code is divided into Individual UI components, Pages and stores. For stores we are using Redux a predictable State Container so all our UI is just a reflection of the store.
UI challenges
The most challenging part of our UI is Add listing form that let’s user publish there listings to platforms they have selected. This is a core feature and needs to be robust and provide better experience for users then the existing platforms they are used to.
All platforms have unique inputs and some common ones all combined can be more than 50+ inputs for users to fill, To make this process smooth as possible for users we have come up with a very easy to use interface.
Frontend deployment
Our frontend Is deployed to vercel, our CI for our frontend is very straight forward
With every commit to main branch it’s published to our production domain. We have different deployments for development and have preview branch for all the pull request and branches.
Our web app is a static CSS and JS bundle and can be deployed to any static web hosting platforms.
Third Party Integrations
Infrastructure & Deployment
Production Environment:
Development Environment:
Leveraging a single Lightsail instance for streamlined testing and experimentation. Utilizing github action for CI/CD pipeline.
Monitoring and Logging
Our backend architecture includes robust monitoring and logging mechanisms to ensure system health, diagnose issues, and optimize performance.
- New Relic: Used for system monitoring of all microservices and error logging. It allow us to monitor each api request separately and filter our API that are failing or having slow response rate.
- Sentry: For Development environment we are using sentry for monitoring services and errors.
- ElasticSearch: This is used for storing logs of development environment.
Cost Management
Our Production Server Costs around $200 with following breakdown:
Development Server Costs us $80 with AWS Lightsail being only instance.
Roadmap Changes
As we scale to more user following are the changes we are thinking about