Giter Site home page Giter Site logo

cits3403-project's Introduction

CITS3403-Project

Purpose of the Application

ThinkMad is a discussion forum site that allows ThinkPad users and enthusiasts to share their knowledge, help others, and talk about all things ThinkPad related. It uses a question and response system, with users being able to create an account, and then use this account to post questions and respond to existing questions from other users.

Group Members

Student ID Name Github Username
22957747 Kirsty Straiton K-Straiton
23343513 Lauren Pudney laurenpudz
23417131 Sebastian Gazey Sebagabones
23599356 Sersang Ngedup sersangn

Architecture

How to Launch

For the following steps make sure you are in the root directory of the repository.

  1. Create a python virtual environment
python3 -m venv .venv
  1. Activate the environment
source .venv/bin/activate
  1. Install the requirements
pip install -r requirements.txt
  1. Create the secret key enviroment variable
export FLASK_SECRET_KEY='<SECRET_KEY_OF_YOUR_CHOICE>'
  1. Create the database
flask db init
flask db migrate
flask db upgrade
  1. Run the app
flask run
  1. Add dummy data to the server
    • Once the flask app is running, open a new terminal in the same directory.
    • Activate the python virtual enviroment in the new terminal
    • Then run the following command
flask add_data

How to Run Tests

Unit tests

  1. Activate the virtual environment and export secret key (as shown in the steps above)
  2. Run
python3 -m unittest tests/unittests.py 

Selenium

  1. Have Chrome installed and ready to launch
  2. Activate the virtual environment and export secret key (as shown in the steps above)
  3. Run
python3 -m unittest tests/selenium.py

cits3403-project's People

Contributors

sebagabones avatar laurenpudz avatar k-straiton avatar sersangn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

cits3403-project's Issues

Minor search fixes

Minor fixes to improve search function and usability:
Change page name for search results page to ThinkMad Search - [query]
Add notice for end of search results so that users know when no search results remain, and it is more obvious when a query has not returned any results.

Create template for navbar

Create basic template for navbar that can be added to pages. Navbar should be responsive and contain ThinkMad logo.

Remove duplications on stylesheet

Many styles in the stylesheet appear to have been duplicated, some multiple times. Duplicate styles should be removed so that each only appears once.

Change single choice buttons on pronouns to multi-select

Could we change the pronouns select on sign-up to instead of being only able to select one option, to being able to select multiple? Not sure if we could then change it so that if someone selects multiple options the pronouns tab on the profile page (and pronouns in general) just uses one from each option? We could maybe switch from buttons to drop down letting you choose the order/number you want? Not urgent and would love to hear y'alls thoughts on it

Set up directory structure

In root there should be index.html and all other html pages. There should be a resources folder with css, js, and images subfolders.

Fix .gitignore not ignoring __pycache__ correctly

Currently /pycache and /app/pycache is still being tracked. These have been added to the .gitignore file earlier but these folders and files need to be removed from the repo for the .gitignore stuff to work.

Make response box on post page stick to the bottom of the viewport

Currently the field to add a comment to a post is located under the post and above all the responses. This field needs to be styled, and made sticky to the bottom of the viewport so you can type and send a reply no matter how far you have scrolled through the comments.

Reformat the nav bar

Reformatting the navigation bar so that it's layout is more user friendly and modern. Also, make the fonts the same, and remove the old logout button, and potentially make the search icon larger

Add basic custom css to style.css

Add some basic css to the style.css file. This should be enough to get basic and consistent styling across the pages. The colour theme will be based on Tokyo Night theme.

Log in on main not working

On logging into the site, the redirection to /profile throws an error of form being undefined, but that seems to be due to some code being present in profile.html that shouldn't be there (must have been missed in a PR review).
Removing

 <form name="editCount", action="", method="post">
          {{form.hidden_tag()}}
          {{form.ThinkPadCount(placeholder="Username", size=8, class="form-control my-2", id="usernameInput", type="number")}}
          {{form.editCount(type="submit")}}

   </form>

from profile.html should fix it

Add password check on sign-up page

Add a client side check on the sign-up page to check if both Password and Confirm Password fields have the same value before sending data to server.

Create a user profile page

Create a user profile page that can be viewed when logged in. It will show a user's username, pronouns, the number of questions asked, the number of responses, the number of thinkpads owned, and a section where you can swap between viewing the user's questions and responses.

Create modal for creating a new post

Create a pop up modal that will contain a form for the user to fill out when creating a new post. It will have fields for the title and the body. It will have a 'Cancel' and 'Post' button, and no cross/exit button.

Create test cases as per lecture requirements

Heya people - we need to make a bunch of test cases like we were told in the lecture - I know we have been testing as we go using our personal preferred methods, but we need to make sure we have scalable testing :)

Add tags/badges

Add the ability to put tags on posts. There should be a set list of tags to choose from when creating a post. Having the tags be clickable as well to filter the posts would also be really good.

Chrome form highlighting issue

On Chromium based browsers, when filling in the form on the login page and sign-up page, either with autofill passwords, or with simple html form autofill, the background in the username and password boxes both change to a white colour instead of staying the colour they are normally.
image

Set up Flask

Setup Flask for the repository - add in a virtual enviroment

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.