Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 4 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,69 +17,17 @@ In your terminal
1. Clone the repo locally to your machine by running `git clone https://github.com/krmroland/stackoverflow-lite-ui`
2. change your current directory (`cd`) to wherever you cloned the app in 1 above.

# UI

#### Demo
A working demo is hosted [here](https://krmroland.github.io/stackoverflow-lite-ui/)

![demo image](demo.gif "Demo")

##### Features
- Users can create an account and log in.
- Users can post questions.
- Users can delete the questions they post.
- Users can post answers.
- Users can view the answers to questions.
- Users can search for questions on the platform
- Users can view the answers to questions.

#### Developer Notes

UI template development uses the following tools;
- [Handlebars](https://handlebarsjs.com/) templates for code modularity and re-usability which are then compiled down to plain html
- [Sass](https://sass-lang.com/) a CSS preprocessor, which adds special features such as variables, nested rules and mixins that makes CSS development enjoyable
- [webpack](https://webpack.js.org/) for module bundling and with the help of [loaders](https://webpack.js.org/loaders/) , it is able to process do the following;
- Compile **Sass** to **CSS**
- Compile Handlebar templates **(.hbs)** to **html**
- Trans-pile **Es6** Javascript to **ES5**
- Remove **Unused css selectors** from final build keeping the bundle size minimal
- Live reloading, with [browser-sync](https://browsersync.io/) that makes local development enjoyable
- Prettify the generated html before it is saved
- Uglify and minimize both **CSS** and **JavaScript** in production to reduce bundle sizes


_Do not make any changes in the `UI/dist` folders since the directory will be cleaned on every application build_



#### Requirements
Ensure that you have the following tools available locally on your machine

- [Node js](https://nodejs.org/en/), a JavaScript runtime built on Chrome's V8 JavaScript engine.
- [A package manager](https://en.wikipedia.org/wiki/Package_manager) ([npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/lang/en/)) for installing **webpack** and its dependencies
- [Git](https://git-scm.com/) , a Version Control System

#### Setup
While in the project root `cd into the ui` directory

#### Install Dependencies
While still in the terminal run `npm install` or `yarn` depending on which package manager you have installed .

#### Building the UI templates
While in the terminal in the `UI` directory
1. `npm run build` or `yarn run production ` to compile `.hbs` ,`css`,`js`, and images
2. `npm run production` or `yarn run production` to compile `.hbs` ,`css`,`js`,`images` and minify them
3. `npm run watch` or `yarn run watch` to set up a local development server and watch all the files for changes and live reload

# API
#### This __api__ is currently has two versions hosted on heroku;
#### Demos
This __api__ is currently has two versions hosted on heroku;
- [v.1.0 (In memory Data Structures)](https://andela-stackoverflow-v1.herokuapp.com/api/v1.0/)
- [V.1.1 (Uses Databases)](https://andela-stackoverflow.herokuapp.com/api/v1.1/)

#### Requirements
- [Python](https://www.python.org/) A general purpose programming language
- [Pip](https://pypi.org/project/pip/) A tool for installing python packages
- [Virtualenv](https://virtualenv.pypa.io/en/stable/) A tool to create isolated Python environments
- [Postgresql](https://www.postgresql.org/) An open source relational database

#### Development setup
- Create a virtual environment and activate it
```bash
Expand All @@ -100,9 +48,6 @@ While in the terminal in the `UI` directory
# Delete all tables and recreate them
flask migrate:fresh
```



#### Run the application
```bash
python run.py
Expand Down
Binary file removed demo.gif
Binary file not shown.
3 changes: 0 additions & 3 deletions ui/.babelrc

This file was deleted.

2 changes: 0 additions & 2 deletions ui/.gitignore

This file was deleted.

Binary file removed ui/andela.png
Binary file not shown.
53 changes: 0 additions & 53 deletions ui/package.json

This file was deleted.

65 changes: 0 additions & 65 deletions ui/src/dummyData.json

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconArrowThickDown.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconArrowThickUp.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconBook.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconCheck.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconDashboard.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconEdit.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconEnvelope.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconGlobe.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconHome.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconKey.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconLink.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconPlus.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconTag.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconTrending.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconUser.hbs

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/icons/IconView.hbs

This file was deleted.

Binary file removed ui/src/images/avatar.jpeg
Binary file not shown.
Binary file removed ui/src/images/user1.png
Binary file not shown.
Binary file removed ui/src/images/user2.png
Binary file not shown.
Binary file removed ui/src/images/user3.png
Binary file not shown.
3 changes: 0 additions & 3 deletions ui/src/js/app.js

This file was deleted.

25 changes: 0 additions & 25 deletions ui/src/js/links.js

This file was deleted.

21 changes: 0 additions & 21 deletions ui/src/js/textArea.js

This file was deleted.

13 changes: 0 additions & 13 deletions ui/src/js/voting.js

This file was deleted.

18 changes: 0 additions & 18 deletions ui/src/layouts/app.hbs

This file was deleted.

33 changes: 0 additions & 33 deletions ui/src/layouts/auth.hbs

This file was deleted.

5 changes: 0 additions & 5 deletions ui/src/pages/answers.hbs

This file was deleted.

Loading