Git Product home page Git Product logo

accord's Introduction

GQP

๐Ÿ‘‹ About me

I'm a 4th-year Computer Science major at The University of British Columbia. I'm passionate about leveraging algorithmic thinking alongside financial technology to deliver data-driven solutions founded on key performance indicators. Feel free to contact me by email or via my socials!

Colin Lefter | LinkedIn Colin Lefter | Email


๐ŸŒ GitHub Stats

Colin's GitHub Stats

๐Ÿช„ Tools and Languages

๐ŸŽฏ Top Skills

:electron: Current Developments

Genesis Quantitative Platforms

GQP GQP

accord's People

Contributors

colinlefter avatar hocng7 avatar notbaopham avatar thunderiw avatar tobynguyen710 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tobynguyen710

accord's Issues

Requirement 2: Allow the user to log in to the platform with an existing account.

Creating the Login Page so that the users can log into Accord with their existing account:

  • Creating Test Cases for the Login process (i.e. Test if the input username and password data are correctly processed and sent to the query process, test if the login only happens if the input data matches the data in the database).
  • Creating/checking the database for the Account Class entity to be in the right format for querying the data for login confirmation.
  • Creating the front-end presentation/display for the Login Page.

Running tests with Jest

About Jest

Jest is a JavaScript unit testing framework that is a popular choice for React applications. We will be using Jest to run all of our tests in our Next.js application.

Running Tests

To run tests, navigate to the Frontend/ directory and create all tests under the __tests__ directory. Refer to the tests already under that directory to understand the general style of writing tests. To run all tests in that directory, run npm run test:jest.

Design Patterns

  1. Specific:
  • Who: Hoc Nguyen
  • What: Write a description of 2 design patterns that Accord is going to implement for the project. Write the explanation for why they are chosen and how we would implement them.
  1. Measurable:
  • The documentation must include the description, rationale, and how to implement for 2 design patterns.
  1. Attainable:
  • I understand the slides from the Professor and I am able to write professionally acceptable reports.
  1. Relevant:
  • This is one of the requirements for our M3 documentation.
  1. Time-Based:
  • I'll have this done by Sunday, March 3rd, 2024.

Write testing report

  • Develop a test plan that will detail the requirements for testing for the Accord application.

Application Development Workflow

The Architecture

As we are developing a web application, we will be using the following tech stack:

  1. Next.js (framework for React)
  2. React
  3. Django (Python backend)
  4. TypeScript
  5. Python
  6. Mantine React Components library
  7. Tailwind CSS
  8. Visual Studio Code

The Workflow

We will be using Next.js as our React framework to develop our web application. For now, the entirety of our web application will be running on one local server. We are using a Node backend (TypeScript) in which our frontend is built with React components. In the future, it is anticipated that a significant portion of our backend will need to be developed in Python in order to handle the SMS feature of our application. Therefore, our Python backend will exist in a separate server (via Django) which will communicate with our main web application server via HTTP requests. This will require exposing API endpoints for our Python backend.

Getting Started

If this is the first time you are pulling from the repo, open a new command line and run npm install (make sure you install Node.js and the npm package manager first if you don't have this on your system).

To start up the server, run npm run dev.

As per the instructions from the terminal, navigate to http://localhost:3000/.

Once the server is online, you can keep modifying the application/pages directly and just save the files to see the changes reflected in real-time. To shut down the development server, simply delete your terminal.

About Next.js

Next.js is a React framework that adds additional functionality on top of what React already has to offer. Its main selling point is server-side rendering. During the development process, we will be running the development server to work on our web application. This is recommended for development. However, once our project is completed, we will build the pages for our application using npm build to demo our application in production mode.

The Project Structure

The main sections we will be working from are the app and components directory. SInce we are using React, all of our components will exist in our components directory and will be imported into the respective pages within the app directory. The layout.tsx file is just a general layout file that has already been set up and does not need to be modified until further notice. For example, the page.tsx file is what you currently see when you launch the application.

Python Backend

Django

To start the Python backend server, run py manage.py runserver. In case you need the port, you can add the port after runserver such as py manage.py runserver 8080

Configuring local connections to MongoDB Atlas

About

MongoDB Atlas is a multi-cloud database that can be accessed via your Atlas account as well as locally through MongoDB Compass or VS Code extension. You have 2 ways to interact with the database via a GUI:

  1. Through Atlas on your browser
  2. Through the Compass desktop application

In terms of writing queries, you will need to refer to the documentation for Query Documents. Watch this video for a quick intro on how everything works.

Setup Instructions

  1. Go to MongoDB Atlas and create an account
  2. Accept the invite to my project on Atlas
  3. In the Frontend/ directory, create a .env file and follow the instructions listed at the bottom of this doc
  4. Test your MongoDB connection to the frontend by having the development server for Next.js up (npm run dev) and then navigating to http://localhost:3000/api/testMongoDB. You should see the following if your connection is successful: {"message":"Successfully connected to MongoDB!"}
  5. Test your MongoDB connection to the backend by executing python manage.py under the backend directory. At the top of the list of available commands, you should see the following if your connection is successful: Pinged your deployment. You successfully connected to MongoDB!. Note: I configured Django so that the database connection is automatically established every time any Python file is executed.

.env file setup

Firstly, make sure you have the following installed: mongodb and dotenv. If not, do npm install mongodb and npm install dotenv or use yarn.

Inside the .env file, place the following content:

MONGODB_USERNAME=<username>
MONGODB_PASSWORD=<password>
MONGODB_URI=mongodb+srv://<username>:<password>@accord-systems.umbugbv.mongodb.net/?retryWrites=true&w=majority&appName=Accord-Systems

Set MONGODB_USERNAME and MONGODB_PASSWORD to the credentials for your Atlas account that I gave to you. Do not change replace <username> and <password> in MONGODB_URI. That will be replaced with a script that runs when the database connection is established in Next.js. For windows users, open PowerShell as administrator and execute New-Item -ItemType SymbolicLink -Path .\.env -Target ..\.env. This is needed because Django can access that .env file but Next.js can't as it is outside of the Next.js app (Frontend directory).

NOTE: do not include the angle brackets (<, >).

You do not need to worry about accidentally committing your .env file as it is already listed in .gitignore.

M3 Report finalize

  1. Specific:
  • Who: Hoc Nguyen
  • What: Ensure that all 4 parts of the document meet the M3's requirements.
  1. Measurable:
  • There must be one sequence diagram for each use case, and the sequence diagrams are correctly designed.
  • One UML Class Diagram is correctly designed for our application.
  • The testing plan is correct and include all the plan that we will be implementing for our project.
  • Two design patterns that align with the team goals and requirements.
  1. Attainable:
  • I have studied the slides from COSC 310 thoroughly to help with my quality assurance ability for the M3 document.
  1. Relevant:
  • This is final quality assurance step to make sure that our M3 document is ready for submission.
  1. Time-Based:
  • I'll have this done by Tuesday, March 6th, 2024.

Requirement 1: Allow users to create an account on the platform.

  • Creating the Registration page so that the users can create their account in Accord:

  • Creating Test Cases for the Registration process (i.e. Sending the data to the database, checking if the processed data is correctly recorded)

  • Creating the database for the Account Class entity to hold the input information from users.

  • Creating the front-end presentation/display for the Registration Page.

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.