Giter VIP home page Giter VIP logo

acmas-frontend's Introduction

ACMAS-Frontend

Lint Code Base Codacy Badge Django CI

ko-fi

Usage


Note: Docker is a pre-requisite installation to run ACMAS in a development environment. It is highly recommended to use Docker Desktop instead of Docker CLI. If you do not have Docker installed, please do so before continuing to the remainder of the instructions.

Setup

Using the Docker containers

Each time you make changes to the code you will need to turn off the Docker container and then turn it back on. Make sure to turn off the container when you are done working. Some changes to the database structure may require manual deletion of docker "volumes" associated with ACMAS.

Start Docker

In order to run Docker applications you must open Docker Desktop or start the Docker service on your device.

Navigate to /ACMAS-Frontend/ACMAS

Open the repository directory ACMAS-Frontend and navigate to the ACMAS directory within. Open this ACMAS directory in the command-line or terminal.


Turn on the Docker containers when you want to start working

docker-compose up -d --build

Turn off the Docker containers when you are done working

If you want to shut down normally: docker-compose down

If you want to flush your database and project files: docker-compose down -v


Using ACMAS with Docker

After turning on the Docker container follow these steps:

Ensure that the Docker application was successfully built and is running

  • Successful builds will return no errors (red)

  • One of the following messages will appear in your command prompt

    • Note: If you do not flush, only the affected containers will appear
    Running 3/3
    - Container acmas-db-1      Started
    - Container acmas-web-1     Started
    - Container acmas-nginx-1   Started
  • Ensure that the application's containers in Docker Desktop all appear as green

  • Navigate to localhost in any web browser

    • If this does not work, default to using 127.0.0.1

Resolving issues with Docker and/or ACMAS

  1. Check for an error message. If one appears, search it on Google or talk to other ACMAS developers on your sub-team
    • Error messages will appear inside Docker containers. Access these by clicking on the container name in Docker Desktop or by running docker ps to get container IDs and then docker logs <container ID>.
  2. If you are unable to find the exact error code on Google, attempt to search for similar or more generic versions
  3. Discuss the issue with other ACMAS sub-teams
  4. Talk to the project lead Jacob @jaw12346
  5. Open an issue!

Executive Summary

ACMAS, or Automatic Course Material Archiving System is a free-to-use database site for anyone to both upload and view documents, materials, coursework, etc. for various courses and questions from any school/institute. On the internet today, there are many services that allow students to help each other with homework from various courses all over the world. However, those services are not free to access, which can make it difficult for everyone to use. ACMAS is a free-to-use database available for anyone to upload, and view backtests from their specific college’s courses, which can be very helpful for test preparation.

Features

There are many features that ACMAS will contain to make accessing content and using the database as simple and straightforward as possible. First, ACMAS will be able to support uploading problems as photos/PDFs/scanned-in documents. In addition to this, there will also be the ability to search for problems by a specific school and course, by a specific question, or by image, which would all allow the user to find the backtests and backwork that they are looking for and use them for their own studying. There also will be links from questions on backtests to alternative answers to the same question from other sources.

acmas-frontend's People

Contributors

buhats avatar dependabot[bot] avatar hikari1nvoid avatar jaw12346 avatar justinbanzon avatar matthewglanz avatar nathant-99 avatar nickmocks avatar noahcussatti avatar rren8957 avatar ruikangrpi avatar susan-hatfalvi avatar vydyas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

acmas-frontend's Issues

Unable to search for a manually-entered question via Search By Course

Describe the bug
If a user uploads a question via "Manual Entry," that question does not appear when searching using the "Search By Course" feature. Currently the question file only appears when using "Search By Question."

To Reproduce
Steps to reproduce the behavior:

  1. Upload a question manually using "Manual Entry."
  2. Go to the homepage.
  3. Attempt to search for that question using "Search By Course"
  4. See error

Expected behavior
The manually-entered question's automatically generated file should appear both when using "Search By Question" and when using "Search By Course."

Desktop:

  • OS: Windows 11
  • Chrome

Dark Mode Toggle

Feature
Implement a dark mode toggle that will switch the website from light mode to dark mode for a given user. The toggle will be on the navbar. This will affect all template pages and components throughout the website.

Additional context
Make sure to use the colors from the given design on Discord.

Unable to upload multiple files with the same name

Describe the bug
When attempting to upload a file named "filename.pdf" to school "a" and course "b", the file successfully uploads, but when another file named "filename.pdf" is uploaded to school "c" and course "d" the database does not update.

Expected behavior
Files with the same name should be allowed to be uploaded both to the same school/course and to the database as a whole.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome

Create a GitHub action to automatically deploy changes on Main to AWS

Describe the solution you'd like
When a PR is approved and merged to Main, I would like GitHub to automatically notify the server and tell it to pull the latest version of Main and rebuild the docker containers hosting the website.

Describe alternatives you've considered
I have been doing this process manually since the project's conception.

Additional context
Only @jaw12346 has the server credentials required to close this issue.

Website Style

Make website Fancy™. Clean it up for the final release!

Fix centering issues and remove old assets

Manual upload page and text-viewer pages both are uncentered or have uncentered content when filled in. All web pages need to have the old ACMAS logo removed from them, meaning that relative spacing should be adopted.
image
image
image

Implement Google Analytics

By implementing Google Analytics, it will be easier for the development team, and specifically, the UI team, to develop more accessible and enjoyable features for the website.

Implement SEO

Is your feature request related to a problem? Please describe.
We need to implement proper Search Engine Optimization so that we appear on Google when someone searches "ACMAS" or other key terms that relate to our project and our goals (backwork/backtest/homework/exams/practice/etc).

Describe the solution you'd like
Implement SEO such that "ACMAS" is on the first page of Google. Currently, we don't seem to appear on Google searches at all.

Create a downtime page for scheduled maintenance and server issues

Is your feature request related to a problem? Please describe.
When ACMAS is taken offline either due to intentional maintenance or due to a server issue I would like to have a default webpage posted.

Describe the solution you'd like
When intentionally bringing down the website I would like to run a command that starts a "scheduled maintenance" page. When the server goes offline unexpectedly I would like for a "server issues" page to be posted automatically.

Describe alternatives you've considered
I'm not sure how this will work, but since nginx runs as a service it may be possible to post a webpage through the default "Welcome to NGINX" page that happens when the server is offline.

Create an Error-404 landing page

Describe the solution you'd like
When a user attempts to visit a website that doesn't exist redirect them to an "Error: 404" page with a prompt to return to the ACMAS homepage.

Additional context
This is related to my request in #100 to create downtime pages, but this can be done through Django rather than Nginx, reducing complexity.

Assign page with urls

Define the links for static pages.
example:"%ip/index.html"-->index page[done]
"%ip/search"-->search index??
or anything else??

Update VS Code launch script to work with Docker Compose

Describe the bug
Our VS Code launch script .vscode/launch.json is no longer up to date with the new deployment using Docker Compose

To Reproduce
Steps to reproduce the behavior:

  1. Open ACMAS in VS Code
  2. Click "Run"
  3. Click "Run Without Debugging"
  4. See error

Expected behavior
ACMAS Docker instance should start normally in the console and work properly when navigating to localhost:80.

Screenshots
image

Note
The run command must be equivalent to docker-compose up --build

Upload file POST request not working

Describe the bug
When uploading a file, the POST request fails because the uploadFile function in views.py does not set the fType parameter on line 183.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the "Upload file" view
  2. Enter all necessary information
  3. Click "Upload"
  4. See error

Expected behavior
The file to be uploaded

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Firefox Developer Edition
  • Version 119.0b4 (64-bit)

Search by course UI/Search Engine integration

Rather than having users type in their university/courses in text input boxes, replace these with dropdowns in which the user can select from a list of courses.
These dropdowns will be dynamically filled - ex: if RPI is selected as the university, the course dropdown should only display RPI courses.

Sprint 4 Deliverables

-New assignments for Sprint 4 deliverable:
-Product interface mockup
-Work Breakdown Structure
-Updated Project Schedule
-Requirements
-Supplemental Specification
-Deployment diagram

Add a malicious file scanning API in between upload-time and adding to the database

Is your feature request related to a problem? Please describe.
When files are uploaded to ACMAS there is no safety validation check to ensure that the file isn't malicious before being offered to end-users.

Describe the solution you'd like
We should add an intermediate step between a user uploading a file to the site and making it accessible through the search features. www.virustotal.com seems as though they offer a 500 requests/day @ 4 requests/minute free-tier through which we could send the file for verification before adding it to our database.
Given that users are now required to be signed in to gain the ability to upload, we should also automatically ban the user and block their username and email from being used to create a new account in the future. A great additional step would be to block their MAC address, if that's something we can query through Python/Django.

Create a launch.json file for python Django for better debugging

Is your feature request related to a problem? Please describe.
It for better development not a functional requirement.

Describe the solution you'd like
Launch.json with some configuration will solve the issue

Describe alternatives you've considered
Installing PyCharm software

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.