-
Notifications
You must be signed in to change notification settings - Fork 120
Gsoc 25 Week 02 Update by Nikhil-Bhatt #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| name: "Nikhil Bhatt" | ||
| slug: "nikhil-bhatt" | ||
| title: "GSoC'25 Contributor" | ||
| organisation: "Sugarlabs" | ||
| description: "GSoc'25 Contributor, learning through code" | ||
| avatar: "https://avatars.githubusercontent.com/u/154296996?s=400&u=985121a969ea993a325f2690d74a0712f0599309&v=4" | ||
| --- | ||
|
|
||
| <!--markdownlint-disable--> | ||
|
|
||
| # About Nikhil Bhatt | ||
| Nikhil Bhatt is a Google Summer of Code 2025 contributor and full stack product developer with a strong focus on building impactful, scalable tools. | ||
| ## Experience | ||
|
|
||
| - **GSoC 2025**: Music Blocks v3 Backend Development | ||
|
|
||
| ## Current Projects | ||
|
|
||
| - Git backend for Musicblocks | ||
|
|
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider removing this line. |
||
| ## Connect with Me | ||
|
|
||
| - **GitHub**: [BeNikk](https://github.com/BeNikk) | ||
| - **Email**: [[email protected]](mailto:[email protected]) | ||
| - **LinkedIn**: [Nikhil bhatt](https://www.linkedin.com/in/nikhil-bhatt-3b37a0255/) | ||
| - **Twitter**: [Nikhil](https://twitter.com/Be_Nikkk) | ||
86 changes: 86 additions & 0 deletions
86
src/constants/MarkdownFiles/posts/2025-06-15-gsoc-25-Nikhil-Bhatt-week02.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| --- | ||
| title: "GSoC '25 Week 02 Update by Nikhil Bhatt" | ||
| excerpt: "Implemented edit functionality for project repositories and introduced a forking mechanism for collaborative workflows." | ||
| category: "DEVELOPER NEWS" | ||
| date: "2025-06-10" | ||
| slug: "2025-06-10-gsoc-25-nikhilbhatt-week02" | ||
| author: "@/constants/MarkdownFiles/authors/nikhil-bhatt.md" | ||
| tags: "gsoc25,sugarlabs,week02,nikhilbhatt" | ||
| image: "assets/Images/GSOC.png" | ||
| --- | ||
|
|
||
| <!-- markdownlint-disable --> | ||
|
|
||
| # Week 02 Progress Report by Nikhil Bhatt | ||
|
|
||
| **Project:** [Git backend for Musicblocks](https://github.com/benikk/musicblocks-backend) | ||
| **Mentors:** [Walter Bender](https://github.com/walterbender), [Sumit Srivastava](https://github.com/sum2it) | ||
| **Reporting Period:** 2025-06-7 – 2025-06-14 | ||
|
|
||
| --- | ||
|
|
||
| ## Goals for This Week | ||
|
|
||
| - **Implement an edit route** to allow users to update project data securely using hashed keys. | ||
| - **Design and implement a forking mechanism** where users can fork existing project repositories into new independent ones. | ||
| - **Integrate project origin tracking** in forked repos through metadata. | ||
|
|
||
| --- | ||
|
|
||
| ## This Week's Achievements | ||
|
|
||
| 1. **Edit Project Functionality** | ||
| - Created a secure API endpoint that allows users to update their project repository content using a key-authenticated system. | ||
| - The backend checks the key hash stored in the `metaData.json` before applying any updates. | ||
| - PR: [Edit Project API](https://github.com/BeNikk/musicblocks-backend/commit/1f61a089de7d8dbede2d46a101611133a1190bf6) | ||
|
|
||
| 2. **Fork Project Repository** | ||
| - Developed a new feature that enables students to fork other students' public projects into their own repositories under the same organization. | ||
| - Forked repositories retain original content (`projectData.json`, `metaData.json`) and include the original repository link in the metadata (`forkedFrom` field). | ||
| - PR: [Fork Feature](https://github.com/BeNikk/musicblocks-backend/commit/d1b7220476dc1fd58c1b38dc59c8a4991871ac45) | ||
|
|
||
| 3. **Project Metadata Enhancements** | ||
| - Updated the metadata structure to support fork tracking and improve key validation. | ||
| - Ensured consistency between project ownership, fork source, and editing rights. | ||
|
|
||
| --- | ||
|
|
||
| ## Challenges & How I Overcame Them | ||
|
|
||
| - **Challenge:** Understanding and handling GitHub’s `SHA` and `Base64` requirements when editing file content through the API. | ||
| **Solution:** Read GitHub API docs and integrated `Buffer.from(...).toString('base64')` and used file `sha` to ensure proper file overwrites. | ||
|
|
||
| - **Challenge:** Unsure if re-initializing Octokit and generating a new installation token per request was optimal. | ||
| **Solution:** Kept this approach for now as each request is stateless and works correctly. Optimization will be explored after baseline features are stable. | ||
|
|
||
| --- | ||
|
|
||
| ## Key Learnings | ||
|
|
||
| - Learned how to **authenticate and authorize edits** to GitHub repos using hashed keys and GitHub’s content API. | ||
| - Understood the internal structure of GitHub forks and metadata handling. | ||
| - Improved knowledge of **Octokit**, GitHub APIs, and best practices for writing file content (`projectData.json`, `metaData.json`) to a repo. | ||
|
|
||
| --- | ||
|
|
||
| ## Next Week's Roadmap | ||
|
|
||
| - Add **pull request functionality** between forked and original projects. | ||
| - Improve project listing UI with fork indicators. | ||
| - Begin planning for collaborator permissions and PR review workflow. | ||
|
|
||
| --- | ||
|
|
||
| ## Resources & References | ||
|
|
||
| - **GitHub API Docs:** [REST Reference](https://docs.github.com/en/rest) | ||
| - **Octokit:** [octokit/rest.js](https://github.com/octokit/rest.js) | ||
| - **MetaData Example:** `metaData.json` includes `hashedKey`, `theme`, and `forkedFrom`. | ||
|
|
||
| --- | ||
|
|
||
| ## Acknowledgments | ||
|
|
||
| Thank you to my mentors and the Sugar Labs community for guidance and feedback, and to the GitHub community for their detailed API documentation and tooling support. | ||
|
|
||
| --- |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider a new line here.