Commerce
Project links
View deployed project site View source code on GithubSkills used & Tech stack
- Web development - Backend
- Python
- Django
- Test Driven Development
- HTML/CSS
- Bootstrap
- Responsive Design
- Linux
- Git
- Heroku
- Django Signals
- User uploaded images
Tl;dr
Important: The project was formerly deployed using Heroku.
Since this cloud service stopped its free usage, the website is down for the time being.
You can still clone the project's repo, install the requirements in a new Python env,
and run it with python3 manage.py runserver
.
This is an ecommerce website based on auctions, where you can post, bid, and comment other items. You can open an account by registering. You are able to post images of your items, delete items, edit items, and close the auction - letting the highest bid user win the item. You can browse items based on category, activity, and watchlist.
I learned a lot from this project: Deep knowledge on the fundamentals of Django, working with the official django documentation, django signals, expanded knowledge of available python libraries, handling user uploaded images, basic deployment on heroku, etc.
Too short; I want to read
About
The fist working version of this project (as of this writing) was finished on March 7th 2022.
This is an ecommerce website based on auctions. You can register yourself as a user and start using the application right away. Login and logout whenever you need to.
The main functionality of this app revolves around creating items in a certain category, sharing them with the rest of the world, and bidding on other people's items, and let other people bid on yours.
With your own item, you can decide to close the auction, letting the highest bid user win your item, edit your item, delete it, or even comment it yourself.
With other people's items, you may bid on them, comment them, or add them to your personal watchlist so you can have them in sight anytime.
You may browse items by applying filters like the most populars (items with the highest activity), recent (those who were updated last), view by categories (like books or electronics), watchlist, or your active items.
More about the app
This app was deployed using Heroku.
I spent around two weeks working on the basic features of the app, and some additional time for testing, adding new features, and styling the application with CSS.
If the user doesn't upload an image, a default appropriate image representing an empty image is used. Images must be at most 2MB in size. Current validation accepts only .jpg, .jpeg, and .png file formats.
Passwords are hashed automatically by Django, so there's no risk in your password being revealed.
There are many features ideas that I may add some time in the future, you can check them out on this project's Github repository README.
Obstacles and how I faced them
As with any project or working on something you're not familiar with, obstacles will naturally occur as you work on complex features. I did encounter a handful of them, but I will mention the most prominent ones.
Storing user-uploaded images. Since this app isn't connected to dedicated cloud servers like AWS or Azure, images are stored locally. After a bit of workarounds and tweaking with Django project settings, I was able to store user-uploaded files in a dedicated folder within the project directory.
The next problem I encountered is related to the one mentioned above: Delete user-uploaded images no longer in use. That's when I found out about Django signals. I learned about them, and used a couple of those so the image is deleted along with the item, or the image is deleted when the item's image is edited and replaced.
A combination of everything described above lead to pretty interesting things I could do with Djagno Signals: handling empty user image inputs for a default, handling the popularity feature, handling the updated_at attribute, etc.
What I learned
There are plenty of things I learned through this experience. The most prominent is now my overall growth as a developer. In general, I developed a deeper knowledge of the Python programming language, the Django Framework, HTML, and CSS.
A common best practice I strictly enforced myself to follow for this project was TDD (Test Driven Development), which is about working first on writing the tests for a particular feature, then write the code to pass those tests. Bugs were so easy to find and fix, and I knew for sure the application would be more robust and behave the way I wanted to.
Django has a pretty vast ecosystem, there's almost always a module for everything you need web-related. I deepened my knowledge with many of the framework resources: Models, urls, project settings, ORM, signals, CRUD operations, testing, request and response objects, static file management, user uploaded files, template language (Jinja), Django CLI, official documentation, and much more.
Conclusion
From all the experience I acquired working on this project, and for all the best practices I enforced myself to follow during the process, I proved myself I can learn and work with new technologies fast to achieve whatever may be required for the project, while keeping the code as clean, as robust, as readable, and as scalable as posible.