Skip to content

final-term-project-vibemerchants created by GitHub Classroom

Notifications You must be signed in to change notification settings

UofT-UTSC-CS-sandbox/StudyBuddies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StudyBuddies: Start your academic comeback!

StudyBuddies is a hybrid interactive learning and social media app for University students intended to simplify socialization through the common theme of academic success. It allows students to create new friendships, collaborate on course topics, track their academic progress and add overall convenience to student experience.

StudyBuddies provides its users with the ability to create study groups and track "high activity" study zones so that users can create study groups and meet new people. Users will have the ability to add friends, message them and even create a network. The goal of StudyBuddies is to provide a distraction-free social media alternative that helps support students on their academic endeavors!

Motivation

The motivation behind StudyBuddies is the challenges faced by students who attend post secondary institutions with a large commuter population. Creating meaningful connections at these schools is difficult as most students are at campus strictly during lecture times. A key problem that these students may face as a result is isolation. This plays a role into academic performance, and when the stakes are high and one wants to succeed, something as simple as socialization shouldn't be a barrier. Furthermore, these new connections being formed should be used to the benefit of the user who wishes to succeed.

Installation

Once you have the prerequisites in place, follow these steps to build and run the project:

  1. Clone the CoBuild repository from GitHub:
    Replace username with the actual GitHub username or organization name.

    git clone [https://github.com/username/StudyBuddies.git](https://github.com/UofT-UTSC-CS-sandbox/StudyBuddies)
  2. Navigate to the project directory in your terminal:

    cd StudyBuddies
  3. Install the necessary dependencies by running the following command:

    npm install
  4. Create a .env file in the root of your project and add the appropriate values. For example:

    API_URL=https://api.example.com
  5. Start the Expo development server by executing the following command:

    expo start
  6. To run the application on your mobile device:

    • Download the Expo Go app from the App Store (iOS) or Google Play Store (Android).
    • Scan the QR code generated by the Expo development server with the Expo Go app.
  7. To run the application on an emulator/simulator:

    • For iOS (macOS only): Ensure you have Xcode installed, and open the iOS simulator.
    • For Android: Ensure you have Android Studio installed, and start an Android emulator.
    • The Expo development server should automatically detect the running emulator/simulator and provide an option to open your app.

By following these steps, you will be able to build and run the React Native Expo app on your development environment.

Getting the Project Running

Prerequisites

Setting Up Server

Go Ahead and install the above software

Installing packages

Navigate to src/server and run go mod tidy

Setting up postgres db via docker and linking it to server

In a new terminal:

  1. Run docker run --name postgres -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=password -d postgres:alpine
  2. Run docker run --name redis -d -p 6379:6379 redis:alpine redis-server --save 60 1
  3. Confirm that the docker container exists by running docker ps
    • Output should look like the below:
    CONTAINER ID   IMAGE             COMMAND                  CREATED       STATUS       PORTS                    NAMES
    <some alpha-nums string>   postgres:alpine   "docker-entrypoint.s…"   <1-3s>        <1-3s>   0.0.0.0:5432->5432/tcp   postgres
  4. Check here for more about postgres
  5. In the src/server directory:
    1. touch .env
    2. In your IDE, open the .env file and add the line: DATABASE_URL=postgresql://root:password@localhost:5432/postgres

Running the server

  1. In the src/server directory, run go run github.com/VibeMerchants/StudyBuddies
  2. Confirm output is similar to:
2024/06/12 13:15:36 Starting Server on port 8080
Database URL:  postgresql://root:password@localhost:5432/postgres
2024/06/12 13:15:36 Creating new data
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] POST   /api/account/register     --> github.com/VibeMerchants/StudyBuddies/handlers.(*Handler).Register-fm (4 handlers)
[GIN-debug] POST   /api/account/auth/callback --> github.com/VibeMerchants/StudyBuddies/handlers.(*Handler).AuthCallbackHandler-fm (4 handlers)

Setting Up Client

  1. Navigate to the src/client/StudyBuddies (got to love js bootstrapping tools)
  2. Run npx expo install && npm install
  3. If there are any install errors, get to googling
  4. Else, Run npx expo run ios
  5. This will launch the iOS simulator with the app

Postgres Navigation

  1. To connect to the docker image's postgres db, run pgcli postgresql://root:password@localhost:5432/postgres

Useful Commands

  • \l to list all databases
  • \d to list all tables
  • TABLE <table-name> to view the contents of a table
  • TRUNCATE <table-name> to delete all contents of a table. PLEASE ONLY RUN THIS IN TESTING

Contribution

We welcome contributions to StudyBuddies and appreciate your interest in improving the application. Here are some guidelines for contributing:

Git Flow: StudyBuddies follows the Feature Branch workflow. When contributing, create a new branch for your feature or bug fix.

Branch Naming:

Please use descriptive and meaningful names for your branches, summarizing the purpose of your changes.

  1. Main Branch: This branch typically holds the stable and production-ready code. It is often named "main" or "master" branch, depending on the version control system being used.

  2. Developmental Branch: This branch serves as a staging area for ongoing development work. It may be named "development" or "dev" branch.

  3. Setup Branch: This branch is created for initial setup or configuration changes. It can be named "setup" or "configuration" branch.

  4. Feature Branches: These branches are created for developing new features. Each feature can have its own branch, ideally with a descriptive name reflecting the feature being worked on. For example, a feature branch for adding user authentication could be named "feature/authentication".

  5. Bug Fix Branches: Similar to feature branches, bug fix branches are created to address specific issues or bugs. These branches can be named with a prefix like "bugfix/" followed by a descriptive name or reference to the bug being fixed. For instance, a bug fix branch for resolving a login issue could be named "bugfix/login-issue".

Issue Tracking:

We use GitHub Issues to track bugs, feature requests, and other tasks. Please check the existing issues or create a new one before starting your work.

Pull Requests:

Once you have completed your changes, submit a pull request against the main branch. Another member on the team will review the changes and provide feedback before merging.

We believe that collaboration is crucial for creating the best possible product, and we look forward to your contributions to make CoBuild even better.

Thank you for your interest in StudyBuddies, and we hope that our application empowers your academic comeback!

Figma:

    https://www.figma.com/design/5jjEO4F55cdnYcEQ6unEHD/StudyBuddies?node-id=1647-17907&t=VoIXXMCQnpIpCwos-1

License

MIT

Open in Visual Studio Code

About

final-term-project-vibemerchants created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published