GithubHelp home page GithubHelp logo

salaah01 / furlon-website Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 84.3 MB

Repo for the Furlon Website

Home Page: https://www.furlon.iamsalaah.com

Python 8.69% HTML 5.38% CSS 66.34% JavaScript 5.89% TypeScript 5.26% SCSS 8.26% Dockerfile 0.05% Shell 0.14%

furlon-website's Introduction

Furlon

Summary

Furlon is an e-commerce selling furniture to customers on behalf of furniture stores. The general flow of the business is the following:

  1. Stores either directly (future feature) or via us upload content onto their website. This content includes their store details, list of products with details.
  2. Customers are then able to view these products and make a purchase.
  3. Furlon handles the payment and sends the order details to the store at which point the store is responsible for the delivery.

The website is built using a Python backend using the Django framework following the REST methodology. Data is stored in a relational database.

Django has been the chosen to be the framework for the backend as it is highly opinionated and comes packed with free code which would speed up development. The highly opinionated nature encourages more consistency and that certain things are build correctly and completely which could otherwise pose a potential security threat.

Django handles the models and so the table structure is controlled via the framework. This brings two main advantages: direct interaction with the database is limited and a better consistency is encouraged between the database structure and what Django knows the structure to be.

The front end uses typeScript as supposed to traditional JavaScript to encourage more careful coding and to reduce the number of bugs. The settings prevent typeScript to compile unless all errors are resolved. TypeScript will compile to ES5 to allow better compatibility. This allow allows for better scaling as when new features added and the javaScript bundle size increase, typeScript can be set to compile to ES6 or later which will reduce file size.

All javaScript is bundled together and loaded when the user loads the homepage to allow the script to be cached and thus improve load speeds in the following pages. TypeScript therefore is useful in this setting as it encourages to consider null objects when selecting elements in the DOM. The key motivation behind this method is to enhance user experience by reducing load time.

Quick Start (Development)

This will assume the file structure

Furlon
│
└─── venv
|   │   
│   └─── (virtual environment files)
|
└─── furlon-website
    │
    └─── (website files)

Quick Start (Development)

  1. Create a working directory and move into that folder. mkdir Furlon && cd Furlon
  2. Create virtual environment python -m venv venv.
  3. Clone the Furlon repository and move into the repository root directory cd furlon-webiste.
  4. Install Python dependencies pip install requirements.txt.
  5. Install nodeJs packages npm install.
  6. Run batch files to start watch moves for running the Django server on the localhost and watching for changes on SASS and TypeScript files start_workspace.bat. Failing this, run each of following commands in their own shell sessions: python manage.py livereload, python manage.py runserver, npm run watch:sass, npm run webpack.

Production

Compile SASS and TypeScript

Run all processes from Quick Start (Development) except step 6. Instead, run npm run build.

This will compile the SASS files to CSS files and will similarly compile TypeScript files to JavaScript files.

Regenerate Staticfiles

If running on the live server and not the local host, the server will rely on static files existing within ./furlon-website/static/.

To collect all assets and move them into the directory, run python manage.py collectstatic. There will be an prompt to check if you would want overwrite existing files, press "y" then the return key.

Software

Technologies

Front End Back End
HTML5 Python
CSS3 PostgreSQL
SASS Django
TypeScript

Database

The database is handled through the backend framework Django.

furlon-website's People

Contributors

salaah01 avatar

Watchers

 avatar

furlon-website's Issues

Estimated Delivery Date

Within the views which contorl the basket, created a script which will also feed in estimated delivery date.

It is likely this will need to be a bespoke script created for each company.

Promotions Table

  • Create a promotion table which will inherit store and product using and will set start and end date for a given promotion as well as the new price.

  • In the products table create promotions_bool

Create Update Details Options (Customer)

  • Create page where customers will be able to update details
  • Validate their inputs
  • Return error message if inputs are invalid
  • Commit to database if inputs are valid

Promotions in Search Results

  • Add promotions to the context dictionary for the search view.
  • Update the front end to show items which are current on promotion.
  • Add an option to the search to show only items on promotion.

Cookies Setup

  • Store in cookies, cookie preferences
  • Store in cookies address if provided

Create Sign Out Function

  • Show option to sign out in the navigation bar to users who are currently signed in
  • Allow signed in users to sign out

Add Return Policies

  • Add a global return policy to stores_stores
  • Add a return policy to products_products such that the default value will inherit the global return policy.

Create Delete Account Function (Customer)

  • Create page where user will be able to delete their account.
  • Validate option using their password
  • Return to page that explains that their account will be deleted in 30 days and if they log back in this will be cancelled
  • Update database with new status

Create Rooms Page

The rooms page should contain a list of rooms by which a user can filter.

This should redirect them to the search results filtering to include only the rooms they have included.

Create Login Function

Implement a login function such that the following are all satisfied:

  • User can load login page
  • User can login
  • User is authenticated
  • User is authenticated:
    • If user is a customer then load their profile into their navigation options
    • If the user is a store user, load their dashboard into their navigation options

Create View for Promotions

Create the view which will load the template where the store admin will be able to set promotions on and off promotion.

The view should have a POST request handler such that whenever there is a change, it will change the value in products_products.promotion to reflect whether or not it is in promotion.

Promotions Section in Index

  • Include items in promotion into the context dictionary in the view.
  • Create a section in the index which include a link to the promotions page along with a list of promotions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.