Skip to content

Dleibe1/Project-Builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚧 This is a work in progress 🚧

This is a portfolio-building project.

A demo of the app is currently hosted at https://project-builder-e7439342976b.herokuapp.com/

Current working features:

Login with GitHub (OAuth 2.0)

GitHub API:

Generally, Arduino/ESP32 projects have all of the creator's code in a single file (usually a .ino file or main.cpp). After logging into to this app, Click "New Build." Paste the URL of your Arduino/ESP32 main program file into the "Github main sketch file URL" section at the bottom of the form. Example URL: https://github.com/thisistamim/WIFI-Control-Car/blob/master/main.ino

When users visit your project's page on this app, the code section is automatically populated with your main project file's code from GitHub. This way you don't have to paste your code into this app every time you update your code on GitHub. This feature does that automatically!

Create, Edit, and Fork projects:

Micro controller projects come with more than just code. There is also a parts list for any project.

It is for this reason that I created the "Fork Project" feature, which allows a user to fork another user's entire build, including both the parts list and code. Once a project fork is created, clicking "Project Forks" on a project's display page will show the forked versions of the project.

Other technologies used in the creation of this app:

  • React.js
  • Express.js
  • Objection.js
  • PostgreSQL
  • GitHub Apps
  • Cypress.js

Improvements coming soon:

  1. More Material UI integration.
  2. Option to add a link to purchase parts from the parts list.
  3. Add a search feature for projects.

Dream features:

  1. Generative AI API integration for code suggestions.
  2. More usage of GitHub apps. Currently, it's just there to log in with GitHub.

Usage

  1. Install necessary dependencies with yarn:

    yarn install
  2. In the root of the server folder, create a .env file to hold the environment variables listed below. These environment variables are used for:

 SESSION_SECRET ...........This is for Passport.  Allows Passport to keep track of the currently signed-in user in session.
 GITHUB_API_KEY ...........You will need a GitHub API key to fetch code from a user's main project (.ino or main.cpp) file.
 CLIENT_SECRET,
 CLIENT_ID ................CLIENT_SECRET and CLIENT_ID are obtained when registering this app with GitHub Apps.  
                           They are necessary for generating a user access token, which allows the app to perform actions with GitHub on the user's behalf.
                           See GitHub apps documentation for more information:
                           https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps 
 AWS_ACCESS_KEY_ID,
 AWS_SECRET_ACCESS_KEY,
 S3_BUCKET_PRODUCTION,
 S3_BUCKET_DEVELOPMENT ....These are necessary for image uploading.  For more information, visit
                           https://aws.amazon.com/s3/
                           
 BASE_URL .................This is necessary for the GitHub callback address (used with GitHub apps) where a full URL path is required.
                           If hosting this app on the web, be sure to replace http://localhost:3000 with the
                           base URL of your hosting site. 
                           For example, https://project-builder-e7439342976b.herokuapp.com

.env:

SESSION_SECRET="your-session-secret"
GITHUB_API_KEY="your-github-api-key"
CLIENT_SECRET="your-client-secret"
CLIENT_ID="your-client-id"
AWS_ACCESS_KEY_ID="your-AWS-key-id"
AWS_SECRET_ACCESS_KEY="your-AWS-secret-access-key"
S3_BUCKET_PRODUCTION="your-AWS-S3-bucket"
S3_BUCKET_DEVELOPMENT="your-AWS-S3-bucket"
BASE_URL="http://localhost:3000"
  1. Create the base PostgreSQL database, project-builder_development

    createdb project-builder_development
  2. Run the included table migrations:

    cd server
    yarn migrate:latest
  3. Run the seeder file to populate the app with example data:

    cd server
    yarn db:seed
    
  4. Start up the application, from the root folder:

    cd .. # if in the server folder
    
    yarn run dev
  5. Navigate to http://localhost:3000. You should see the introduction page of the Project Builder application.

Releases

No releases published

Packages

No packages published

Languages