Peduns Farm offers freshly harvested farm produce to the comminuty for sale. Clients can select from a variety of farm fruits and vegetables for purchse though our secure online shop.
- As a user I want to know what the farm is about
- As a user I want to easily find eco boxes.
- As I user I want to know the price of the products.
- As a user I want to be able to find products of similar category
- As a user I want to be able to search for products by prize, so that I know what products are cheap and which are expensive
- As a user I want to be able to checkout easily and securely
- As a user I want to be able to use direrent payment methods
- As a User I want to save my details so I easily checkout next time
- As a User I want to have a record of my purchase order
- As a User I want to be able to contact the farm
- As a User I want to visit the farm
- As a User I want to pick my own produce when possible
- As a User I want to have an online account
- As an administrator, I can manage and maintain the e-commerce store.
- As an administrator, I can adjust any product.
- As an administrator, I can add more products.
- As an administrator, I can delete products.
- As a user I want to be able to use direrent payment methods
- Other pyaments such as paypal, klarna can be implemented in the future to give users other secure payment options.
User expectations
- Purchase products
- Adjust products quantity
- Delete products
- Create user account
- Secure payment processing
- Contact the farm
- Stay up to date by following the farm via social media
- Privacy Policy
- Accessability statement
This site uses PostgreSQL provided by heroku.
Wireframes were created using the Balsamiq software.
All Wireframes
- About Us
- Fruit Picking
- Contact Us
- Products
- Cart
- login
- Profile
- Product Management
- Register
- Checkout
- Password Reset
A pdf of the wireframes can be found here, by clicking on the download button in Github. (Please Note: Adobe Acrobat Reader is required to view files in pdf format).
The webiste's design and layout is based on fonts, colors, wireframes, images and icons.
- Google Fonts Oswald is used as the main font and sans-serif as the fallback font.
The color palatte for this project is very minimal, with the default bg-light for navbar and footer.
- border-botton: #21b888;
- used to repalve the horizontal rule on all titles. This shade of green is also a represenation of thgreen color in nature and also most farms.
Below are some of the existing features
- Responsive Navbar
- Social Media links
- Registration page
- Contact us page
- Log in page
- user profile page
- Search functionality
- Admin profile
- Secure Checkout
Below are some features to be implemented at a later stage
- Social media login/registration functionality
- Paypal payments
- HTML5
- CSS3
- JavaScript
- Python
- Postgresql provided by Heroku
Click here for Testing Document
Deploying to Heroku
-
You will need an account to sign up to Heroku
-
Once logged in click the create new app button
-
Select the region closest to you and give the APP a name
-
Set your deployment method to 'GitHub'
-
Connect to GitHub and login
-
Search for the repository you wish to deploy from
-
You will need to head to settings and click 'Config Vars' to set the enviromnents.
- You will now need to set up your Configuration Vars the same way as you did for your env.py
- Set environment in Heroku App
- Go to settings, then click on reveal config vars
- Enter your key value pairs as per your settings.py file, including AWS and STRIPE
-
Make sure you have set up your Procfile and you have updated the requirements.txt prior to deploying
- Enable automatic deploys
- Once it is deployed you will be able to view the app
Amazon Web Services, specifically s3 bucket is used to store the media files (A user account is required to use this service)
-
Creating an acount at https://aws.amazon.com/
-
Create an s3 bucket, follow the documentation of how to set your zone, permission ...
-
Create a user group and its policy
-
create a user for this group
-
Install django-storage/boto3, connecting the bucket to the repo by adding storage to the apps in setting.py. adding the following to my setting.py :
Bucket Configurations
AWS_STORAGE_BUCKET_NAME = 'peduns-farm'
AWS_S3_REGION_NAME = 'eu-north-1'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY')
AWS_S3_CUSTOM_DOMAIN = f'{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com'
Static and media files
STATICFILES_STORAGE = 'custom_storages.StaticStorage'
STATICFILES_LOCATION = 'static'
DEFAULT_FILE_STORAGE = 'custom_storages.MediaStorage'
MEDIAFILES_LOCATION = 'media'
Override static and media URLs in production
STATIC_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/{STATICFILES_LOCATION}/'
MEDIA_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/{MEDIAFILES_LOCATION}/'
Forking the GitHub Repository
By forking the GitHub Repository, you can make a copy of the original repository in your own GitHub account. This means we can view or make changes without making the changes affecting the original.
You can make a copy of the GitHub Repository by "forking" the original repository onto your own account, where changes can be made without affecting the original repository by taking the following steps:
- Login to your account on Github.
- Locate the Repository used for this project.
- On the right-hand side of the Repository name, you'll see the 'Fork' button.
- This will create a copy in your personal repository.
- Once you're finished making changes, return to original repository and press 'New Pull Request' to request your changes to be merged into the original project.
- Log in to GitHub and
- Locate the GitHub Repository.
- Under the repository name, click Code.
- To clone the repository, select HTTPS and copy the link.
- Open Git Bash.
- Change the current working directory to the location where you want the cloned directory to be made.
- Type git clone, and then paste the URL you copied in Step 4.
git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
* To clone this particular repository:
git clone https://github.com/Joan-Amudu/Peduns-Farm
- Press Enter. Your local clone will be created.
- Change into the directory being created.
Click Here for more information about cloning repositories.
This project is only possible because of the contibution of others to the community. While I have used code from external sources and past projects, I always aim to customise the code to make it fit well with my own project, and as such, it is difficult to pin point exact lines of code from external soucres. However, where exact code has been used and not altered at all, I have added comments and acknowledge the source within the code itself.
- The overall structure and code of this porject was derived from following Code Institutes's Boutique Ado.
- The footer was taken from my previous Milestone Project
These statments were derived from previous hackathons I had participated in, specifically
* [Bust IT: Cancer Without Borders](https://vanessacleary.github.io/W-I-T-IT-LAB-Breast-Cancer-Awareness/)
* [SODA Apply](https://soda-apply.herokuapp.com/)
- Ella Olson
- Alesia Kozik
- Antarar Verma
- Pixabay
- Engin Akyurt
- Casa Norte
- Lisa
- Aphiwat chuangchoem
- Townsend Walton
- Mali madder
I appreciate the guidance is recieved from my mentor Brain Macharia