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

[BK]: Create Attributes, AttributeValues, and ProductVariantAttributes Entities and APIs #15

Open
KevinLatino opened this issue Dec 12, 2024 · 38 comments
Assignees

Comments

@KevinLatino
Copy link
Member

KevinLatino commented Dec 12, 2024

Important

Before applying, please read the Contributors Guide. Following the guide increases your chances of being assigned to this task.

Description: Implement Attributes, AttributeValues, and ProductVariantAttributes entities and their associated CRUD APIs.

Entity Definitions

Attribute

import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm';

@Entity('attributes')
export class Attribute {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  name: string;

  @CreateDateColumn()
  createdAt: Date;
}

AttributeValue

import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, CreateDateColumn } from 'typeorm';
import { Attribute } from './Attribute';

@Entity('attribute_values')
export class AttributeValue {
  @PrimaryGeneratedColumn()
  id: number;

  @ManyToOne(() => Attribute)
  attribute: Attribute;

  @Column()
  value: string;

  @CreateDateColumn()
  createdAt: Date;
}

ProductVariantAttribute

import { Entity, PrimaryGeneratedColumn, ManyToOne, CreateDateColumn } from 'typeorm';
import { ProductVariant } from './ProductVariant';
import { AttributeValue } from './AttributeValue';

@Entity('product_variant_attributes')
export class ProductVariantAttribute {
  @PrimaryGeneratedColumn()
  id: number;

  @ManyToOne(() => ProductVariant)
  productVariant: ProductVariant;

  @ManyToOne(() => AttributeValue)
  attributeValue: AttributeValue;

  @CreateDateColumn()
  createdAt: Date;
}

Tasks

  1. Define entities: Attribute, AttributeValue, and ProductVariantAttribute.
  2. Create fully functional CRUD APIs for each entity.
  3. Write comprehensive unit and integration tests.

Acceptance Criteria

  • APIs for CRUD operations work seamlessly.
  • Relationships between entities are properly enforced.
  • Test coverage >80%.
@Supa-mega
Copy link

May I handle this issue?

@Bosun-Josh121
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged:

software engineering background, backend & smart contract dev with contribution to similar tasks(https://app.onlydust.com/u/Bosun-Josh121) looking to make first contribution on this project

How I plan on tackling this issue
I would define the stated entities & create CRUD apis for created entities with tests as stated. Would work on feedback & recommendation ensuring contact. Can deliver within a day upon assignment

@Shukazuby
Copy link

Hello, I am Zubaidat, a backend developer with expertise in TypeORM and building reliable CRUD APIs.

Plan to Solve the Issue:

I will define the Attribute, AttributeValue, and ProductVariantAttribute entities in TypeORM and implement fully functional CRUD APIs for each. Additionally, I will write comprehensive unit and integration tests to ensure each API is reliable and performs as expected.

ETA:
I estimate completing this task in 50hrs, including development, testing, and documentation.

Thank you

@ShantelPeters
Copy link

ShantelPeters commented Dec 12, 2024

Could I be assigned to this?
I am full stack developer with strong experience in Cairo , solidity ,JavaScript,typescript ,react , python etc… looking forward to contributing as this would be my first time contributing to this project…

ETA : 3 days

@blessingbytes
Copy link

I’d like to work on this.

@Benjtalkshow
Copy link

I am a Full Stack Developer with a strong background in blockchain and extensive experience in Next.js/React, TypeScript, and Rust. I’ve made over 49 contributions to over 17 projects in the OnlyDust ecosystem, solving complex issues and delivering efficient, scalable solutions.

I can handle this task.
ETA is 3days.

@Michaelkingsdev
Copy link

I can handle this particular task.

@od-hunter
Copy link

Hi, please can I be assigned this please? I would love to be the given the opportunity to solve this issue please. I have experience in html, css, JavaScript, TypeScript and cairo.

To solve this, I'll take the following steps:

  1. Use TypeORM to define the entities with proper relationships such as Attribute for base entity with a name field, AttributeValue to include a Many-to-One relationship with Attribute, ProductVariantAttribute to include Many-to-One relationships with ProductVariant and AttributeValue.
  2. I'll implement RESTful APIs using a Controller-Service-Repository pattern such as POST, GET, PUT, DELETE endpoints for each entity, then I'll use TypeORM repository methods like create(), save(), find(), update(), and delete().
  3. I'll define API routes in an Express router module for each entity. Next I'll update database state using TypeORM with relationship handling (eager, lazy loading).
  4. Lastly, I'll test thoroughly.

Kindly assign me please, I'm for the task.
ETA: 2 days MAX

@gregemax
Copy link

Can I take this on? I have experience with backend development using TypeScript and TypeORM, and I’m confident in implementing the entities, relationships, and CRUD APIs as described. I’ll also ensure comprehensive test coverage above 80%.

@Ekene001
Copy link

Hello I'm Ekene, a frontend and blockchain developer with proficiency in Rust/solidity, Typescript, react/next js and typescript, and I’m excited about the opportunity to collaborate and bring my skills to the table.

heres how i'll tackle this task:

I will first design the database schema to establish the relationships between these entities. Once the schema is defined, I will create models for each entity in the backend. Then, I will develop the CRUD APIs for creating, reading, updating, and deleting records for these entities, ensuring they follow best practices and are properly validated. Finally, I will test the APIs thoroughly to confirm their functionality and consistency with the intended use cases.

@mimisavage
Copy link

Could I try solving this?

@mexes20
Copy link

mexes20 commented Dec 12, 2024

Hello, can I be assigned to work on this? I'm a fullstack developer with over five years of experience.

@jsanchez556
Copy link

jsanchez556 commented Dec 12, 2024

Hi, I am José Mario, and I am a Senior Full-Stack Developer from Costa Rica, starting to love the development of Web3 and proficiency in an array of technologies such as JavaScript, TypeScript, Go, Python, Node.js, React, and C#. I love contributing to open-source projects.
Currently learning Rust, Cairo, and dApp development. In the last few months, I have had the opportunity to work with projects involving Rust, Cairo, TypeScript, Git, and Docker, further developing my skill set.
My journey in the tech industry has been fueled by a love for learning and innovation. Since version 7.0, I’ve actively participated in ODHacks, driven by my work with Dojo Coding.

How to Approach the Solution:

  1. Implement entities Attribute, AttributeValue, and ProductVariantAttribute establishing appropriate relationships using TypeORM
  2. Provide an implementation for each entity controller with the following CRUD operations: Create, Read, Update, Delete
  3. Ensure proper entity relationships are enforced, such as between Attribute and AttributeValue, ProductVariant
  4. Individual methods and full API flow test writing, test coverage should be more than 80%

ETA: 3 days

@Superfly101
Copy link

Superfly101 commented Dec 12, 2024

Hello. I'm Daniel Ukoha, a software engineer who's passionate about problem-solving and building products that meet users' needs. This is my first ODHack, and I can't wait to make my first contribution.

Here's how I'll tackle this issue:

  1. I will create the three entities (Attribute, AttributeValue, ProductVariantAttribute) in src/entities/
  2. Add their corresponding services in src/services/ with CRUD operations
  3. Create DTOs for input validation in src/dto/
  4. Implement controllers in src/controllers/ to expose CRUD endpoints
  5. Write unit tests for services and integration tests for controllers

ETA: 2 days

@Nityam573
Copy link

Can I take care of this issue?

@1nonlypiece
Copy link

I’m interested in this one.

@gregemax
Copy link

May I take this issue on? I have extensive experience in backend development with TypeScript and TypeORM. I can implement the Attribute, AttributeValue, and ProductVariantAttribute entities with properly enforced relationships, as well as develop fully functional CRUD APIs for each. I’ll also ensure comprehensive unit and integration tests with coverage exceeding 80%.

@BrunoAmbricca
Copy link

BrunoAmbricca commented Dec 12, 2024

I will learn the existing code and research the best approach for this issue

@mariocodecr
Copy link

Hii! My name is Mario Araya, I’m a Software Developer with 2+ years of experience. I have worked with backend technologies such as Cairo, Java, and C#, as well as frontend development using React, NextJS, and JavaScript/TypeScript. I’ve made contributions to open-source projects, completed a Starknet Bootcamp, exercises on NodeGuardians, finished Starklings, and participated in multiple hackathons. I’m also a member of the Dojo Coding community here in Costa Rica.

I will define the entities using the provided structure with typeorm decorators, ensuring relationships and constraints are accurately enforced, and update the database schema with necessary migrations. Develop services in a /services directory to handle database operations and controllers in a /controllers directory to manage API requests for creating, reading, updating, and deleting entities, registering routes in the main router file. Write comprehensive unit and integration tests using tools like Jest or Mocha, ensuring coverage exceeds 80% by testing successful operations, relationship enforcement, and edge cases. Validate functionality to confirm seamless CRUD operations and proper entity relationships, delivering a modular and scalable solution.

@suhas-sensei
Copy link

Gm, i am Suhas, having worked in previous 3 ODs, in issues involving ts, rust & cairo. Here's my approach to the issue concerned.
I will :

Create entity classes with TypeORM decorators for Attributes, AttributeValues, and ProductVariantAttributes, establishing proper relationships and validations
Implement services for each entity with CRUD methods including proper error handling and relationship management
Build controllers to expose RESTful endpoints for each entity's CRUD operations, with proper DTO validation and swagger documentation
Set up repositories to handle database operations and complex queries, especially for the relationship between ProductVariants and AttributeValues
Proper testing.

ETA : 2-3 days max

@ikezuby2012
Copy link

Hello, I'm a full-stack developer with nearly 4 years of experience working with JavaScript, TypeScript, C#, Express.js, and recently exploring Cairo for blockchain development. I’m passionate about building robust and scalable applications while ensuring clean and maintainable code.

For this issue, my approach would be:
Keep the implementation clean and organized:
Write the service logic in the src/service directory.
Implement the necessary DTOs for data transfer.
Controller Integration: Consume the service in the corresponding controller class for proper separation of concerns.
Validation: Create a validation class to verify inputs and ensure data integrity.
Testing: Write comprehensive unit tests to validate the functionality and ensure reliability.

ETA: 2-3 days

@olisaagbafor
Copy link

olisaagbafor commented Dec 12, 2024

Hello StarShop Team,

I’m Olisa Agbafor, a skilled backend developer with over 5 years of experience building scalable APIs and managing database relationships using TypeORM and PostgreSQL. I’m excited to contribute to StarShop’s mission and would love to take on this issue.

My Approach:
Entity Definitions:

I will define the Attribute, AttributeValue, and ProductVariantAttribute entities with the required relationships and constraints, ensuring proper normalization and adherence to TypeORM standards.
CRUD APIs:

Develop and test RESTful endpoints for Create, Read, Update, and Delete operations for each entity.
Ensure robust validation and error handling at all stages.
Unit and Integration Tests:

Write comprehensive tests using Jest to ensure at least 80% code coverage, covering edge cases and relationship constraints.
ETA:
I estimate the work will be completed in 4 days, including testing and documentation.

Looking forward to your approval so I can start contributing. Thank you!

Best regards,
Olisa Agbafor

@khayss
Copy link

khayss commented Dec 12, 2024

I'm a fullstack developer with high preference towards backend. I have worked on backends built with Rust and NodeJS. I understand the nature of work involves with a backend project.

For this issue, I'll:

  • Define the required entities following the project structure.
  • Create fully functional CRUD APIs to service each of this entities.
  • Write tests to ensure the implementation works fully.
  • Ensure these changes does not break the code base or affect any other sections.

I'll be glad to work on this issue.

@DuendexCR
Copy link

Let me try this one!

@Villarley Villarley changed the title Create Attributes, AttributeValues, and ProductVariantAttributes Entities and APIs [BK]: Create Attributes, AttributeValues, and ProductVariantAttributes Entities and APIs Dec 13, 2024
@caxtonacollins
Copy link

I am a Full Stack Developer with two years of professional experience, specializing in web3. I have strong background in blockchain and extensive experience in Next.js/React, TypeScript, Cairo and Rust.

To solve this, I'll first define entities using the provided typeORM models, setup the CRUD APIs for each entity. And finally test the api.

please assign me
ETA is 2days.

@Jagadeeshftw
Copy link

Could I try solving this?

@Ahmad940
Copy link

I’d like to resolve this, well experienced using express with typescript and orms like typeorm, prisma, sequalize and postgres/mysql
I will create the entities for each model in the "entities" folder, abstract the orm / db operations in a "repository" where all db/orm operations will be handled with try and catches to avoid unnecessary handling of these errors in the service directory where we will be calling the repository class and it functions, I will enforce zod typescript validation which have automatic type inference, and ensure the api request form data are what we are expecting and handle all potential errors to avoid the annoying internal server :), and mock tests to ensure are functionalities are in check and no funny bugs!

@Dorcas18
Copy link

Is it okay if I tackle this?

@ekumamatthew
Copy link

May I handle this issue?

@Joewizy
Copy link

Joewizy commented Dec 13, 2024

Can I take care of this issue?

@BraCR10
Copy link

BraCR10 commented Dec 13, 2024

Hello maintainers I’m BRACR10 from the Dojo Coding community, I would like to contribute to this project.I’ll follow your instructions on defining entities, then I plan to create the corresponding routes for each entity to accomplish with the requirement of the CRUD APIs. I will also implement tests when necessary. ETA 1~3 days.

@sonkeydotcom
Copy link

I'd love to give this a go.

@kayceeDev
Copy link

kayceeDev commented Dec 14, 2024

My name is @kayceeDev,

I will tackle this issue using the TDD approach.
I will create the required entities and CRUD functionalities for each.
The TDD approach will ensure the solutions align perfectly with the required edge cases.
My experience in Nestjs and TypeScript will help me write efficient and scalable code. Thank you

I will create draft PR in 10 hrs

ETA: 48 hours

@martinvibes
Copy link

i'm a frontend dev and blockchain dev
May I try my hand at this?
i would love to work on this and get it done

@vestor-dev
Copy link

May I handle this issue?
Would love to tackle this!
kindly assign :)

@Amarjeet325
Copy link

Hi , I am a full stack developer is a versatile professional skilled in both front-end and back-end development, capable of designing user interfaces, building robust server-side applications, and managing databases.
Can I take this from here? Thank you !

@Villarley
Copy link
Contributor

hey @mariocodecr
Task assigned to you. Let me know if you need further clarification or additional support!😊

Here is our telegram group, please join https://t.me/starshopcr

@mariocodecr
Copy link

@KevinLatino thanks

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