Skip to content
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

Cleanup and refactors #150

Open
0xturboblitz opened this issue Jul 17, 2024 · 8 comments
Open

Cleanup and refactors #150

0xturboblitz opened this issue Jul 17, 2024 · 8 comments

Comments

@0xturboblitz
Copy link
Member

0xturboblitz commented Jul 17, 2024

Few things:

  • There are many utils.ts files, refactor so we have less of them
  • Some improvements we did on us-election can be cherry-picked to dev
  • Just like zk-email did, we might want to modularise better nfc-reading, proving and input generation so it's easy to import in new projects. For instance, folks from Euclid could more easily use the parts of our codebase they need.
Copy link

onlydustapp bot commented Jul 22, 2024

Hey @sanieni6!
Thanks for showing interest.
We've created an application for you to contribute to Proof of Passport.
Go check it out on OnlyDust!

@TropicalDog17
Copy link

TropicalDog17 commented Jul 29, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi team,
I'm a software engineer with experience in Typescript and has also helped with many open source projects. I've been watching this project and I'm interested in it. I want to help fix the problems with organizing the code better.
I hope I can help with the project!

How I plan on tackling this issue

I will follow the descriptions and make sure the refactored code is well-tested.

@lauchaves
Copy link

lauchaves commented Jul 29, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hey! I'm Lau Chaves, and I would love to contribute to this issue!

I have over 5 years of experience working with JavaScript, React, TypeScript, and Ruby. Additionally, I'm part of Dojo Coding Costa Rica.

Feel free to review my OnlyDust profile https://app.onlydust.com/u/lauchaves

How I plan on tackling this issue

Id would approach this on this way:

  1. Refactor utils.ts Files
    Goal: Consolidate multiple utils.ts files into fewer, organized files.

Steps:

  • Identify all utils.ts files.
  • Group utilities by purpose (e.g., string manipulation, date handling, API helpers).
  • Create new modular utility files (e.g., stringUtils.ts, dateUtils.ts, apiUtils.ts).
  • Update imports across the project.
  • Delete old utils.ts files.
  1. Cherry-Pick Improvements from us-election to dev
    Goal: Integrate specific improvements from us-election into dev.

Steps:

  • List the specific improvements.
  • Create a new branch from dev (e.g., feature/cherry-pick-us-election).
  • Cherry-pick relevant commits from us-election.
  • Resolve any merge conflicts.
  • Test changes thoroughly.
  1. Modularize NFC-Reading, Proving, and Input Generation
    Goal: Create modular components for NFC-reading, proving, and input generation.

Steps:

  • Identify core functionalities.
  • Create separate modules (following approach used in zk-email.).
  • Export functions
  • Update project imports.

@jsanchez556
Copy link

jsanchez556 commented Jul 29, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello, I’m Jose Mario from Costa Rica. With over 15 years of experience in development, I am passionate about contributing to open-source projects and currently expanding my skill set with Rust, Cairo, and Solidity as part of my involvement with Dojo Coding. My recent role as a Senior Backend Developer allowed me to specialize in a range of technologies including Node.js, JavaScript, TypeScript, Docker, among many others. I am eager to apply my extensive experience and newly acquired skills to new challenges and innovative projects.

How I plan on tackling this issue

  • Start by listing all the utils.ts files in the project and their contents.
  • Group similar utility functions together.
  • Create a new file index.ts in a central location, like a utils directory.
  • Move the utility functions from the various utils.ts files into the newly created files based on their categories. For example: stringUtils.ts for string-related utilities,
    dateUtils.ts for date-related utilities etc.
  • In each of the newly created utility files, export the functions so that they can be used elsewhere in the project. Example in index.ts: export * from './stringUtils'
  • Update utils imports
  • Identify, analyze and cherry-pick improvements made in use-election branch
  • Modularize NFC reading, proving, and input generation for easier import into new projects (taking into account approach used in zk-email)

@DavidOredu
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Experience in C# for Unity Game development.
Experience in Python.

@adrianvrj
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi, my name is Adrian, I am a passionate developer looking forward to gain some experience in web3 projects. I have experience with Typescript which might help me with this issue.

How I plan on tackling this issue

  • First I would read the code to make sure I understand what I have to do.
  • Read all utils.ts files and figure out how I can refactor them to have less utils.ts files.
  • Refactor the improvements (move them) from us-election to dev.

@Psalmuel01
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello, I'm Samuel Dahunsi. I am a passionate web3 frontend engineer with extensive experience in JavaScript, React, and Next.js. I have built several Web3 projects, and won a couple hackathons. I also write secure and scalable smart contracts in Solidity for the Ethereum ecosystem. Been in the space for two years.

My skills in both frontend development and blockchain technology will ensure high-quality, clean, and maintainable code for this task. I am also very effective and fast, and love to do a perfect work.

How I plan on tackling this issue

I'd love to apply for the task. Here's how I plan to tackle it:

Refactor utils.ts Files:

I'll review all the existing utils.ts files throughout the codebase.
I'll consolidate similar utilities to cut down on redundancy and improve organization.
By creating a more structured directory for utility functions, it'll be easier to maintain.
Cherry-Pick Improvements from us-election to dev:

I'll identify the key improvements made in the us-election branch.
Carefully cherry-pick and merge these changes into the dev branch, ensuring everything is compatible.
I'll thoroughly test to make sure these improvements integrate smoothly.
Modularize NFC-Reading, Proving, and Input Generation:

I'll analyze our current implementation of NFC-reading, proving, and input generation.
I'll refactor these components to be more modular and reusable, taking a similar approach to what we did with zk-email.
This will ensure these modules are easily importable for new projects, making it easier for teams like Euclid to use parts of our codebase.

@Jemiiah
Copy link

Jemiiah commented Aug 7, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a frontend web3 blockchain developer I have contributed to other OD project, and this would be my first time on this repository, and I would love to contribute to this project and work on this issue

How I plan on tackling this issue

To address this issue effectively, here's how I hope to go about it :

  1. Refactor utils.ts Files
    Goal: Reduce the number of utils.ts files to minimize redundancy and improve code organization.

Steps:

  1. Identify all utils.ts files: Locate all utils.ts files across your project.

  2. Analyze contents: Determine the functionality provided by each utils.ts file and identify common functionalities.

  3. Create centralized utility modules: Combine related functionalities into fewer, more cohesive utility modules. For example, create separate modules for string utilities, array utilities, and other common functionalities.

  4. Update imports: Refactor code to use the new centralized utility modules. Ensure all references to old utils.ts files are updated.

  5. Test thoroughly: Run all tests to ensure the refactor didn't introduce any issues.

  6. Cherry-pick Improvements from us-election to dev
    Goal: Apply specific improvements made in the us-election branch to the dev branch.

Steps:

  1. Identify commits: Find the specific commits in the us-election branch that contain the desired improvements.

  2. Cherry-pick commits: Use git cherry-pick to apply these commits to the dev branch

  3. Resolve conflicts: If there are any merge conflicts, resolve them and ensure the code works correctly.

  4. Test thoroughly: Run all tests to ensure the changes didn't introduce any issues.

  5. Modularize NFC-Reading, Proving, and Input Generation
    Goal: Make the NFC-reading, proving, and input generation code modular for easier reuse in other projects like Euclid.

Steps:

  1. Identify modules: Determine the specific parts of your codebase responsible for NFC-reading, proving, and input generation.
  2. Refactor into modules: Create separate modules for each functionality. For instance:
    nfc-reading: Handle NFC-related functionality.
    proving: Handle zero-knowledge proof generation.
    input-generation: Handle input preparation for proofs.
  3. Define clear interfaces: Ensure each module has a clear and well-documented interface to facilitate easy integration.
  4. Export modules: Ensure these modules can be easily imported into other projects.
  5. Update project structure: Refactor the existing codebase to use the new modules.
  6. Test thoroughly: Ensure the refactored code works as expected.
  7. Documentation: Provide documentation on how to use these modules in other projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants