Skip to content

hawkinswinja/mini-commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

106 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Sample Minicommerce App using React, Django Rest Framework for Backend, React and OpenID Connect for Authentication

This project is a full-stack application built on Django Rest Framework for backend, React for frontend amd Postgresql for backend. Docker Compose is used to orchestrate all the services, including the backend, frontend, database, and watchtower.

Table of Contents

Overview

This repository uses Docker Compose to manage multiple services in a containerized environment, ensuring consistency and ease of setup. The following services are included:

  • Backend: Handles the API and core application logic.
  • Frontend: User interface of the application.
  • Database: Stores application data (e.g., PostgreSQL).
  • Redis (optional): Caching layer.
  • Watchtower (optional): Docker continuous Deployment

Prerequisites

Before you begin, make sure you have the following installed:

Setting Up the Project

  1. Clone this repository:
    git clone https://github.com/hawkinswinja/minicommerce.git
    cd minicommerce
  2. Create a .env file in the root directory and configure the necessary environment variables. You can use the provided env.template as a reference.

Starting the Services

To start the services, run the following command:

   docker compose up

This will start all the services defined in the docker compose file file.

Stopping the Services

To stop the services, run:

docker compose down

This will stop and remove all the containers.

Useful Commands

  • To rebuild the services:

    docker compose up --build
  • To view the logs of a specific service:

    docker compose logs <service_name>
  • To run a command in a running container:

    docker compose exec <service_name> <command>

Local Setup

For local development without Docker, follow these steps:

  1. Set up the backend:

    • Navigate to the backend directory:
      cd backend
    • Follow the instructions in the backend README to set up and start the backend services.
  2. Set up the frontend:

    • Navigate to the frontend directory:
      cd frontend
    • Follow the instructions in the frontend README to set up and start the backend services.``

Contributing

We welcome contributions! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature/your-feature-name
  3. Make your changes and commit them:
    git commit -m "Add your message here"
  4. Push to the branch:
    git push origin feature/your-feature-name
  5. Open a pull request.

Thank you for contributing!

Deployment

Build and Push Docker Images

About

A mini e-commerce using DRF backend and React Frontend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors