Bytesize Insights is a powerful application that aggregates repository PRs and utilizes ChatGPT to generate concise summaries. The user-friendly front-end interface allows personalized customization of subscribed repositories. Stay informed with weekly email digests detailing the latest happenings in your chosen repositories. Experience streamlined PR management with Bytesize Insights.
Visit our Wiki for more information regarding application usage.
To work on this locally, first pull the repository. Since this is a monolithic application, we include both the backend and frontend within this repository.
Follow these instructions before writing any code:
- Install Node version 21.x
- Install npm version 10.x
- Navigate to
/frontend/byte-size/in order to work on the frontend. - Run
npm installto install our dependencies - Run
npm run devto load the development server located athttp://localhost:3000
You will need to be running the backend simultaneously if you would like to walk through user workflows. Check the Backend section to run the server. The frontend can be run with next start in the frontend/byte-size/ directory.
Follow these instructions before updating the code:
- Install Python 3.12.x
- Install Pip 23.x.
- Run
pip install -r requirements.txt - Create a
.envfile with the following fields:
MONGO_URI=...
GITHUB_TOKEN=...
OPENAI_TOKEN=...
The backend server can be run with uvicorn backend.api.main:app --reload in the root directory.
Our AWS Lambda function is stored in /bytesize-insights_cron/lambda_function.py. Navigate there to update the function. BACKEND_URL is stored in the AWS environment field, but it points to where the backend runs. If you would like to test the code, set BACKEND_URL=http://localhost:8000/ and run the function through the command line.
We use Vercel to handle the deployment process for us. Since this was initially a school project, we were looking for a tool that required the least amount of configuration that could get the application deployed the quickest. Vercel met our requirements because we provide Vercel permissions to access our GitHub repository, removing the need for a continuous deployment script. Instead, our continuous deployment is fully configured through the Vercel dashboard user interface to update whenever code is pushed onto the main branch. There is also no build script, as this is done through the Vercel dashboard. Additionally, Vercel enables us to run the tests prior to each deployment.
To deploy this application, simply make changes to the main branch via a pull request. The badge at the beginning of this README indicates the status of the deployment: if the application has been deployed successfully, the badge will be green. This application utilizes Vercel to conduct continuous deployment of the frontend and backend. Similarly, the cron job used to send emails and scrape the GitHub API for pull requests has implicit continuous deployment via changes to the backend API. Whenever changes to the main branch of the repository, Vercel will trigger a new deployment of the frontend, backend, and cron job.
The AWS Lambda function is deployed on one of our AWS accounts. The logic is simple and shouldn't be changed, so there should not be a need to adjust this, but contact @Zasaimster (saimm.ahmadd@gmail.com) for more information.