Guides (usage and description) to the Gem-Inn application.
Table of Contents
- What Gem-Inn Is
- Technologies Utilized in Crafting Gem-Inn
- Database Structure
- How to Install and Run the Gem-Inn Application Locally On Your Device
- Log into the Application with existing User Credentials
- Files to Update for your Payment Processing Keys
- Contributor's Words !important
Gem-Inn is an online store application for jewelries and clothings with online payment channels.
(gif image for preview here)
Gem-Inn is crafted in:
the following programming languages and frameworks:
- Django (Python)
- Pytest (for comprehensive test of the application)
- Coverage to determine more tests to be ran
- Selenium for client-side UX tests
- vanilla JavaScript
- Bootstrap 5.3
- vanilla CSS3
The online payment channels are handled by:
- PayPal (credit/debit card and PayPal payments)
- Stripe (credit/debit card payments) — (yet to come)
-
You must have Python3 downloaded and installed on your device.
On a laptop/desktop, follow the guidelines on the official Python website.
If on an Android device, follow these instructions to download and install this app, Termux. (Termux is a virtual environment for running almost all programs that could be run on a computer, on your mobile device.) After following these instructions, run the following command;
pkg install python
-
After installing Python3, download and install a text editor (e.g. VS Code) if you do not have one.
If on an Android device, follow these instructions to download and install this app, Acode
Then go to your terminal and follow these steps:
(For the following steps, I encourage you to use either your GitBash terminal provided by your VS Code or your Android Termux terminal, as I explain these installation steps in Linux commands. Do not use Windows Shell, unless you intend to use the synonyms (Windows translations) for these Linux commands.)
-
cd (change directory) into the folder directory from your terminal and create a folder in your favorite directory on your computer manually or you may create one from there using the following commands like below;
cd C:/Users/maxim/Desktop
Here I changed directory into my personal Desktop space on my windows Computer.
If on an Android device, use these commands on the Termux shell (this gets you into your phone's internal storage file directory. And then;):
cd /storage/emulated/0
And then on either desktop or mobile;
mkdir gem-inn
Or whatever you wish to call the application
-
cd into this newly created folder
cd gem-inn
and create a virtual environment (skip this if on an Android device, as Termux is already a virtual environment running on your device)
py -m venv venv
-
Activate the newly created virtual environment so that you can install Django and other dependencies.
source venv/Scripts/activate
You may decide to skip this step (step 5), to install and run Django from the system-wide installation. But virtual environments are always recommended.
-
Clone this repository from here on Github using either of the 2 commands on your terminal:
git clone https://github.com/maxralph1/gem-inn.git
or
git clone [email protected]:maxralph1/gem-inn.git
-
Use the command below to install all dependencies I utilized in this application as can be seen from my requirements.txt file
pip install -r requirements.txt
-
Now, cd into the geminn folder included from the cloned github repository and run the command below;
cd geminn
and
py manage.py runserver
-
Finally go to your browser and visit the link:
http://localhost:8000/
or
http://127.0.0.1:8000/
Use either of these credentials below to login to existing users in the database we already created.
On the other hand, if you intend to start afresh and know what you are doing, delete the database and run migrations afresh utilizing our existing database schema on this app's codebase.
For generic user:
Username: user
Password: password1234
For admin:
Username: admin
Password: password1234
You must update these files following these instructions, to be able to process payments.
(instructions here)
(instructions here)
If you have any suggestions on how to improve this project, please share. This application is strictly for demonstration purposes.
It is not yet production-ready and should never be used as such.
I have decided to put in my time into other projects as this isn't generating funds for me at the moment.
I will continue to gradually update this project in my free time, over a period of time (couple of months) until it is production-ready, while I handle other projects that would sustain my income.
However, if you would love to have this project completed urgently for your personal use, do not hesitate to contact me on: [email protected].
**On the general pattern of coding, if you noticed, the entire application has a specific approach in structure. I however decided to deviate (bring in several flavors) a little (but paid attention not to deviate too much) from these principles so as to showcase my skills. I would stick to a particular pattern in a real-world application (N.B: my next e-commerce store before the end of 2023 would follow this strict pattern).
Finally, contributions/suggestions are welcome.