A comprehensive multi-seller e-commerce platform built for Algerie Post, enabling sellers to create online stores and customers to browse and purchase products through both mobile and web interfaces.
- Overview
- Architecture
- Features
- Technology Stack
- Prerequisites
- Installation & Setup
- Usage
- API Documentation
- Database
- Project Structure
- Deployment
- Contributing
- License
Algerie Post E-Commerce Platform is a full-stack application that provides:
- Multi-seller marketplace where sellers can register and manage their stores
- Mobile application for sellers to manage their business on-the-go
- Web storefront for customers to browse stores and make purchases
- Centralized backend API handling all business logic and data management
- PostgreSQL database with comprehensive schema for e-commerce operations
The platform supports the complete e-commerce workflow from seller registration to order fulfillment, with features like product management, payment processing, delivery tracking, and subscription plans.
The application follows a microservices-like architecture with separate components:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ React Native │ │ Backend API │ │ PostgreSQL │
│ Mobile App │◄──►│ (Node.js/TS) │◄──►│ Database │
│ │ │ │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ ▲ ▲
│ │ │
▼ │ │
┌─────────────────┐ │ │
│ Web Storefront│◄──────────────┘ │
│ (React/Vite) │ │
└─────────────────┘ │
│
┌─────────────────┐
│ Email Service │
│ (SMTP) │
└─────────────────┘
- Backend: RESTful API built with Node.js, TypeScript, Express, and TypeORM
- Frontend: React Native mobile application for sellers
- Storefront: React web application for customer-facing store browsing
- Database: PostgreSQL with 18+ tables covering all e-commerce entities
- Store registration and management
- Product catalog management
- Order processing and tracking
- Payment method configuration
- Delivery settings management
- Subscription plan management
- Analytics and reporting
- Browse stores by domain
- Product search and filtering
- Shopping cart functionality
- Secure checkout process
- Order tracking
- Transaction history
- User management (approve/reject sellers)
- Platform-wide analytics
- System configuration
- Content moderation
- JWT-based authentication
- Email verification system
- Role-based access control
- Secure password hashing
- Admin privilege management
- Google OAuth integration
- Node.js with TypeScript
- Express.js framework
- TypeORM for database management
- PostgreSQL database
- JWT for authentication
- Passport.js for OAuth
- Nodemailer for email services
- React Native
- Expo framework
- React Navigation
- Axios for API calls
- AsyncStorage for local data
- React with TypeScript
- Vite build tool
- React Router for navigation
- Tailwind CSS for styling
- Axios for API integration
- Node.js (v18 or higher)
- PostgreSQL (v12 or higher)
- npm or yarn
- React Native development environment (for mobile app)
- Git
- Android Studio (for Android development)
- Xcode (for iOS development on macOS)
git clone https://github.com/Samir-Guenchi/ecommerce.git
cd ecommerce# Create PostgreSQL database
createdb algerie_post_ecom
# Run the schema
psql -U postgres -d algerie_post_ecom -f DB/schema.sqlcd Backend
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your database credentials, JWT secret, and SMTP settings
# Start development server
npm run devThe backend will run on http://localhost:3000
cd Frontend
# Install dependencies
npm install
# Start Metro bundler
npm start
# In another terminal, run on device/emulator
npm run android # or npm run ioscd Storefront
# Install dependencies
npm install
# Configure API URL (optional - defaults to localhost:3000)
echo "VITE_API_URL=http://localhost:3000/api" > .env
# Start development server
npm run devThe storefront will run on http://localhost:5173
- Registration: Download the mobile app and register as a seller
- Store Setup: Configure store details, theme, and settings
- Product Management: Add products with images, descriptions, and pricing
- Order Management: Process incoming orders and manage fulfillment
- Analytics: Monitor sales performance and customer behavior
- Store Discovery: Visit store domain (e.g.,
store.algeriepost.dz) - Product Browsing: Search and filter products
- Purchase: Add to cart and complete checkout
- Tracking: Monitor order status and delivery
- User Management: Approve seller registrations and manage user accounts
- Platform Monitoring: View system analytics and metrics
- Content Moderation: Manage stores and products
The backend provides RESTful APIs for all platform functionality:
POST /api/auth/signup- User registrationPOST /api/auth/login- User loginPOST /api/auth/verify- Email verificationGET /api/auth/google- Google OAuth loginGET /api/auth/google/callback- Google OAuth callback
GET /api/stores- List storesPOST /api/stores- Create storePUT /api/stores/:id- Update storeGET /api/stores/:id- Get store details
GET /api/products- List productsPOST /api/products- Create productPUT /api/products/:id- Update productDELETE /api/products/:id- Delete product
GET /api/orders- List ordersPOST /api/orders- Create orderPUT /api/orders/:id/status- Update order statusGET /api/orders/:id- Get order details
GET /api/admin/users- List all usersPATCH /api/admin/users/:id/suspend- Suspend userPATCH /api/admin/users/:id/activate- Activate userGET /api/admin/sellers- List all sellers
For complete API documentation, see the Backend README
The platform uses PostgreSQL with a comprehensive schema including:
- 18+ Tables covering users, stores, products, orders, payments, etc.
- Automatic timestamps with PostgreSQL triggers
- Full-text search capabilities
- Foreign key constraints and data integrity
- JSONB fields for flexible data storage
Key tables include:
- users: User accounts and authentication
- stores: Seller store information
- products: Product catalog
- orders: Order management
- order_items: Order line items
- transactions: Payment transactions
- seller_registrations: Seller onboarding
- subscriptions: Subscription plans
ecommerce/
├── Backend/ # Node.js/TypeScript API
│ ├── src/
│ │ ├── config/ # Configuration files
│ │ ├── controllers/ # Request handlers
│ │ ├── entities/ # TypeORM entities
│ │ ├── middleware/ # Express middleware
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic
│ │ └── utils/ # Utility functions
│ ├── migrations/ # Database migrations
│ └── uploads/ # File uploads
├── Frontend/ # React Native mobile app
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── screens/ # App screens
│ │ ├── navigation/ # Navigation setup
│ │ ├── services/ # API services
│ │ └── i18n/ # Internationalization
│ └── assets/ # Images and fonts
├── Storefront/ # React web storefront
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API integration
│ │ └── styles/ # CSS styles
│ └── public/ # Static assets
├── DB/ # Database schema
│ └── schema.sql # PostgreSQL schema
└── internship-report/ # LaTeX documentation
└── rapport-stage.tex # Internship report
cd Backend
npm run build
npm startcd Frontend
npm run build:android # or build:ioscd Storefront
npm run build
# Deploy the 'dist' folder to your hosting service- Set
NODE_ENV=production - Use environment variables for sensitive data
- Configure CORS properly
- Set up SSL certificates
- Implement proper logging and monitoring
- Use a process manager like PM2 for Node.js
- Set up database backups
- Configure CDN for static assets
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Write tests for new features
- Update documentation as needed
- Ensure code passes linting and formatting
- Use meaningful commit messages
This project is licensed under the ISC License.
- GUENCHI Samir
- GUERRERODJ Abdennour
Developed as part of an internship project at ENSIA (École Nationale Supérieure d'Informatique) in collaboration with Algérie Poste.
For support and questions:
- Create an issue in the repository
- Check the documentation in each component's README
- Review the internship report for detailed system documentation c:\Users\Abdennour\Desktop\Algerie Post\README.md