TRGST Store is a modern e-commerce platform built with React and Vite, utilizing API endpoints from a Django backend.
It provides a seamless shopping experience for users and efficient management tools for administrators.
- Features
- Prerequisites
- Installation
- Usage
- API Endpoints
- Authentication
- Configuration
- Testing
- Contributing
- License
- Browse a wide range of products categorized by type, brand, and price range.
- Search for specific products using keywords or filters.
- View detailed product information, including images, descriptions, and prices.
- Create an account for personalized shopping experience and order tracking.
- User authentication and authorization.
- Add products to your shopping cart for easy checkout.
- Integration with external payment systems.
- Order processing and status tracking.
- Admin dashboard for managing products, orders, and user accounts.
- Product management with support for preferences, categories, sizes, and colors.
Before running the project, make sure you have the following installed:
- Python 3.8+
- Django 4.2.5+
- SQLite3 database
-
Clone the repository:
git clone https://github.com/110nard0/store.git
-
Navigate to the project directory:
cd store
-
Install dependencies:
pip install -r requirements.txt npm install
-
Use Django's default SQLite3 database by applying migrations.
Alternatively, Create a PostgreSQL database and configure the database settings in settings.py.python3 manage.py migrate
-
In another terminal go to the same directory and start the frontend development server.
npm run dev
You may also use Vite to build static files and serve the SPA assets using Django.
npm run build python3 manage.py collect static
Open your browser and go to
http://localhost:5173
. -
Start the backend development server:
python3 manage.py runserver
Open your browser and go to
http://localhost:8000
.
The backend provides APIs for managing products, preferences, categories, sizes, colors, shopping carts, and orders.
Refer to the API documentation for detailed information on how to use each endpoint.
Request:
POST /api
POST /api/v1/waitlist
Content-Type: application/json
{
"name": "agu dike",
"email": "test@gmail.com"
}
Response:
Status: 200 OK
Content-Type: application/json
{
"id": "59a1f652-7542-4a86-983c-f3568a490670",
"name": "agu dike",
"email": "test@gmail.com"
}
The backend uses JWT-based authentication.
To authenticate, obtain a JWT token by sending a POST request to /api/token/
with valid credentials (email and password).
The server returns a token pair(access and refresh) that you can use to authenticate and perform user actions.
Environment variables or configuration settings required for the project can be found in the .env.example file.
The API was extensively tested using Postman.
The collection of the test requests and with included scripts can be found here:
If you'd like to contribute to this project, please follow these steps:
- Fork the repository
- Create a new branch (git checkout -b feature/your-feature)
- Commit your changes (git commit -m 'Add some feature')
- Push to the branch (git push origin feature/your-feature)
- Create a new Pull Request
The Django framework is open-source software licensed under the BSD3 license.