Hey there, curious minds and tech enthusiasts! Get ready to explore pBay, a passion project that's a blend of innovation, self-challenge, and community spirit. 🚀
At pBay, I've embarked on a thrilling journey of self-challenge and skill honing. This project isn't just an E-commerce Web App – it's a testament to my determination to push boundaries and explore the fascinating world of full-stack development.
- Based on Django 4
- login / logout, register
- Verify registration with OTP code
- automatically remove expired OTP with Celery Beat
- completely custom user model
- Groups & Permissions
- products show by category
- media stored in Object Storage
- Admin can see and delete or download items in object storage
- actions on object storage items run asynchronously with celery
- Cashing system with Redis
- separate product details page
- user can add product to cart
- add/remove items from cart handled by Session
- Bill and Checkout page
- Orders model
- discount feature based on coupon
- ckeditor for product description
- use environment variable to manage credentials
- search mechanism
- Dockerized whole project
- manage celery and celery beat with supervisord
- order manager page
- add delivery methods
- add seller role to add/remove new product
- better bootstrap theme
- python version > 3.8
- docker
Step 1 : create a new virtualenv and install requirements.
$ pip install -r requirements.txt
Step 2 : rename .env.example
to .env
$ mv .env.example .env
Step 3 : to use OTP code verification create an account in kavenegar and
put your API Key in .env
.
you need some KYC verification to use API completely
KAVENEGAR_OTP_SECRET="put your secret here"
Step 4 : if you want to store your media files in object storages (like aws, ...) set USE_ARVAN_BUCKET
in
environment file to True
and set other secret keys.
for this project i used Arvan Cloud object storage called bucket. since it uses
boto3
you can use any other object storage you want without any changes.
USE_ARVAN_BUCKET="True"
ARVAN_ACCESS_KEY_ID='put your keys here'
ARVAN_SECRET_ACCESS_KEY='put your keys here'
ARVAN_ENDPOINT_URL='put your keys here'
ARVAN_STORAGE_BUCKET_NAME='put your keys here'
Step 5 : go to docker_compose_files
directory and run Redis
and RabbitMQ
containers.
$ docker compose up -d
Step 6 : run celery
and celery beat
.
$ celery -A config worker -l info
$ celery -A config beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
Step 7 : run django and reach whole project in http://localhost:8000/.
$ python manage.py runserver
you can use
db.sqlite3
DB that is in this project. if you use it, the user and pass for admin test user isadmin
and12345
. some product are available within it.
NOTE : All credential in this project is for testing purpose DO NOT use it for production.
Give a ⭐️ if you find pBay intriguing, share your insights, and let's keep the conversation alive. Contributions are very welcome.
Made by ❤️ under MIT license.