From 55cae4d9282be67002bae4929154dde623bc3f5c Mon Sep 17 00:00:00 2001 From: Zibilicious <78936389+Zibilicious@users.noreply.github.com> Date: Tue, 5 Dec 2023 18:56:01 -0500 Subject: [PATCH 01/15] Add files via upload This is the new application for Artika Refashion. Please use this for all future communications. --- .../applications/artika_refashion (new).md | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md new file mode 100644 index 00000000..14920fd4 --- /dev/null +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md @@ -0,0 +1,146 @@ +# Vechain -Easy A Startup Grant Application Template +Hackathon Date: 7-8th Oct 2023 + +## Project Overview +- Problem statement: BCG track +- Are you applying for the grant with the same project you submitted at the vechain Hackathon: Yes +- Project name: Artika Refashion +- Team name: Artika Refashion +- GitHub handle: onkr0d +- College / Employer: Boston University +- Payment Address: 0x9c48353000A0F5E2F4553E114d93e4e23492354f + +### Overview + +We are Artika Refashion, a marketplace that connects independent fashion designers to users for fixing, upstyling, and innovating fashion. It all starts with a user's piece - a vintage jacket handed down from father to father, for example. This jacket has sentimental and monetary value but now needs upstyling or repair. That's where we come in: users can connect with fashion designers to customize or upgrade existing pieces, and the change is recorded on-chain, via NFTs representative of the clothing. Over time this will tell a story, which further adds value and expression to the piece. +With Artika 2.0, we directly partner with brands to create clothing tagged with NFTs. With this approach, we can include even more information about a piece, like verifying that its production is environmentally friendly or the materials used. At this stage, we can tie in loyalty tokens for exclusive content from brands, which further establishes them as environmentally friendly and rewards users for being a part of our platform. Vechain is a sustainable blockchain with EVM compatibility, low gas fees, and a focus on sustainability. With a rich ecosystem of libraries, would provide the best development and user experience. + +### Project Details + +- [BCG One-pager](https://docs.google.com/presentation/d/1Luw6KogeUF-JXmZVR5bVUMikw8UoAuFe/edit#slide=id.p1) +- [Pitch Deck](https://www.canva.com/design/DAFwn8CgBDg/FY_CvfOqyIX_y02IhlxmWg/edit?utm_content=DAFwn8CgBDg&utm_campaign=designshare&utm_medium=link2&utm_source=sharebutton) +- [UI Mockups/designs](https://www.figma.com/file/c6xrEmp5I8KnHepTvaHxwK/artika-refashion?type=design&node-id=0-1&mode=design&t=uaGC8cLWyiq9SIkn-0) +- [API specifications](https://github.com/IainWinter/Artika/blob/main/docs/api.md) + +### Tech stack + +- RESTful API backend made with the Go programming language and the Gin Web Framework. +- Solidity smart contracts for NFT tracking +- PostgreSQL to store private user data which should not be published on chain +- Flutter frontend will allow us to code once and deploy to a variety of screen layouts/devices. + +### PoC +Our PoC was submitted to the VeChain/EasyA hackathon and can be found [here](https://github.com/IainWinter/ArtikaRefashion) + +### Ecosystem Fit +We differ as the only fashion SaaS company in Web3, with a digital platform that connects independent fashion designers to users, promoting circular fashion by means of fixing, upstyling, and innovating fashion. Moreover, while sustainable supply chain tracking has been applied to many industries, no venture allows the consumer to view the product’s sustainable production and renovation history, to which they can contribute (sustainable supply chain tracking is introduced in Artika 2.0). + +* Web2 Competitors: + * Depop + * Poshmark + * Thredup + * Stitch Fix + * Fiverr + * Upwork + * Etsy + +## Team + +### Team members + +- Iain Winter (Team lead, Developer) +- Alika Grigorova (Project manager) +- Ivan Khramtchenko (Developer) +- Zi Zheng (Designer) +- Anna Sokolova (Project manager) + +### Team Website + +- [artikarefashion.com](https://www.artikarefashion.com/) + +### Team's experience + +* Ivan: + * https://github.com/onkr0d/HackHarvard22-Repo/commit/f57dbce9d0e44f89b5d48b17c9deb6cf0acdef70 + * https://github.com/onkr0d/suc-attendance/commit/29967ebd545225d59dad566306987a04a62376e9 + +* Iain: + * https://github.com/IainWinter/winter-dev-static/commit/879074033b18e23c994f12417431809b94e12ac8#diff-35562a5dc31b1b72ad19939f7448b89dd6af246c55b8419d344dd1b824f574a3 + +* Zi + * Zi has 4+ years of experience working cross-functionally developing and managing mobile apps and websites from marketing agencies and startups to global corporations like Goodyear and Bank of America. + * https://www.zizheng.io/ +* Anna + * Anna has started multiple initiatives and held club leadership positions , as well as gained professional experience managing operations as an intern at Berkshire Hathaway HomeServices. +* Alika + * Alika has worked as a project manager for non-profit initiatives, and gained professional experience as a financial analyst in a private business company. + +### Team Code Repos + +- https://github.com/IainWinter/ArtikaRefashion +- https://github.com/IainWinter/Artika + +### Team LinkedIn Profiles + +- https://www.linkedin.com/in/ivan-khr +- https://www.linkedin.com/in/zi-zheng/ +- https://www.linkedin.com/in/anna-sokolova-419a41273/ +- https://www.linkedin.com/in/iain-winter/ +- https://www.linkedin.com/in/alika-grigorova-61159b281/ + +## Development Roadmap + +#### Overview + +| | Milestone 1 | Milestone 2 | Milestone 3 | Milestone 4 | Total | +| -------------------------- | ----------- | ----------- | ----------- | ----------- | -------- | +| Estimated Duration | 30 d | 60 d | 30 d | 20 d | 140 d | +| Full-time equivalent (FTE) | 2 | 2 | 1 | 1 | 5 | +| Cost (up to $ 30,000) | $ 5,000 | $ 5,000 | $ 10,000 | $ 10,000 | $ 30,000 | + +#### Milestone 1 — Backend & Smart Contracts +| Number | Deliverable | Specification | +| ------ | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| 1. | Documentation | Create the full specification of our API and data requirements for the storage of text and images. | +| 2. | Smart Contracts | Create smart contracts for adding tracking data points to an NFT. Provide an API for users to mint their own NFTs for their clothes | +| 3. | Backend | Create the backend API and a simple test suit. | +| 4. | Simplest Frontend | Create a simple HTML frontend without any styling to gain an idea of our app's requirements for state management. | + +#### Milestone 2 — Frontend +| Number | Deliverable | Specification | +| ------ | ---------------- | ------------------------------------------------------------------------------------------- | +| 1. | Flutter Frontend | Create an app using Flutter to create an iOS, Andriod, and desktop using the same codebase. | +| 2. | Smart Contracts | Connect our app to the VeChain mainnet by using the VeChain Thor RESTful API. | + +### Milestone 3 - Marketing, Testing and Community Engagement +| Number | Deliverable | Specification | +| ------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------- | +| 1. | QA Testing | Test the product's basic functionality for logic bugs | +| 2. | User Testing | Get some test users to use the product and note how easy it is for them to use each feature. Get feedback about ease of use. | +| 3. | Fixes | Start the process of incremental changes based on feedback from QA and user testing | + +### Milestone 4 - Deployment & Marketing +| Number | Deliverable | Specification | +| ------ | --------------- | -------------------------------------------------------------------------------- | +| 1. | Deployment | Deplay the app live for anyone to sign up and use. | +| 2. | Write tutorials | Create blog posts on the website to teach new users how to best use our product. | +| 3. | Marketing | Create a marketing campaign to attract new users. | + +## Future Plans + +### Artika 1.0: +Build a decentralized platform to connect designers and users to facilitate sustainable fashion. Each piece of clothing will be represented as an NFT, each with a unique story, encouraging users to repair and upstyle their clothes instead of throwing them away. + +### Artika 2.0: +Introduce a "sustainably produced" line of clothing, tracked through NFTs and historical records in the supply chain. Our tokenized loyalty system will include Early Access Tokens and VIP Event Access Tokens, which enhance demand and create unique opportunities for users. This collaboration is mutually beneficial, allowing luxury brands to build a "green" reputation without sacrificing profits while gaining new customers. ARTIKA 2.0 also enables users to trade redesigned clothing, boosting engagement and demand. Our long-term vision is to become the go-to social media app in the Web3 fashion industry for entertainment, inspiration, and services. + +## Additional Information + +We have already created UI mockups and a pitch deck which was presented at the Vechain/EasyA hackathon at Harvard. We won 2nd place on the BCG track with these assets, and have edited them since then to reflect the budget and time available provided by this grant. We have not applied for any other grants. + +## Points of contact: +- Peter Zhou (Chief scientist at Vechain) +- Marina Fortunato (Project manager at Vechain) +- Bernhard Kronfellner (Boston Consulting Group) + + From 5080af72a7691afcf860573d867eb74b6671b4b4 Mon Sep 17 00:00:00 2001 From: Zibilicious <78936389+Zibilicious@users.noreply.github.com> Date: Tue, 5 Dec 2023 18:57:55 -0500 Subject: [PATCH 02/15] Update artika_refashion (new).md --- .../applications/artika_refashion (new).md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md index 14920fd4..2f31c154 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md @@ -6,9 +6,9 @@ Hackathon Date: 7-8th Oct 2023 - Are you applying for the grant with the same project you submitted at the vechain Hackathon: Yes - Project name: Artika Refashion - Team name: Artika Refashion -- GitHub handle: onkr0d +- GitHub handle: Zibilicious - College / Employer: Boston University -- Payment Address: 0x9c48353000A0F5E2F4553E114d93e4e23492354f +- Payment Address: 0x50545abB29D7e1724d04958eB2c31aBEF4227559 ### Overview @@ -48,10 +48,8 @@ We differ as the only fashion SaaS company in Web3, with a digital platform that ### Team members -- Iain Winter (Team lead, Developer) +- Zi Zheng (Team Lead) - Alika Grigorova (Project manager) -- Ivan Khramtchenko (Developer) -- Zi Zheng (Designer) - Anna Sokolova (Project manager) ### Team Website @@ -60,13 +58,6 @@ We differ as the only fashion SaaS company in Web3, with a digital platform that ### Team's experience -* Ivan: - * https://github.com/onkr0d/HackHarvard22-Repo/commit/f57dbce9d0e44f89b5d48b17c9deb6cf0acdef70 - * https://github.com/onkr0d/suc-attendance/commit/29967ebd545225d59dad566306987a04a62376e9 - -* Iain: - * https://github.com/IainWinter/winter-dev-static/commit/879074033b18e23c994f12417431809b94e12ac8#diff-35562a5dc31b1b72ad19939f7448b89dd6af246c55b8419d344dd1b824f574a3 - * Zi * Zi has 4+ years of experience working cross-functionally developing and managing mobile apps and websites from marketing agencies and startups to global corporations like Goodyear and Bank of America. * https://www.zizheng.io/ @@ -82,10 +73,8 @@ We differ as the only fashion SaaS company in Web3, with a digital platform that ### Team LinkedIn Profiles -- https://www.linkedin.com/in/ivan-khr - https://www.linkedin.com/in/zi-zheng/ - https://www.linkedin.com/in/anna-sokolova-419a41273/ -- https://www.linkedin.com/in/iain-winter/ - https://www.linkedin.com/in/alika-grigorova-61159b281/ ## Development Roadmap From 26fff945b98100932c71b7fe2adc29f07bc7d437 Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Tue, 19 Dec 2023 20:53:37 -0500 Subject: [PATCH 03/15] Update artika_refashion (new).md Updated Tech Stack section --- .../applications/artika_refashion (new).md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md index 2f31c154..2f47b1d7 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md @@ -24,10 +24,11 @@ With Artika 2.0, we directly partner with brands to create clothing tagged with ### Tech stack -- RESTful API backend made with the Go programming language and the Gin Web Framework. -- Solidity smart contracts for NFT tracking -- PostgreSQL to store private user data which should not be published on chain -- Flutter frontend will allow us to code once and deploy to a variety of screen layouts/devices. +- Smart contracts, written in Solidity, on VeChainThor. +- React Native frontend to create single codebase for all platforms (iOS, Android, Web). +- back4app BaaS to efficiently create, manage and scale backend resources. +- RESTful API backend made with back4app. +- Real-time database, provided by back4app, to store user data and link related objects. ### PoC Our PoC was submitted to the VeChain/EasyA hackathon and can be found [here](https://github.com/IainWinter/ArtikaRefashion) From e92e7e8b9f43b31e6d006c24779c1d8c697a7701 Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Tue, 19 Dec 2023 22:21:27 -0500 Subject: [PATCH 04/15] Update artika_refashion (new).md Updated milestones 2 and 3 --- .../applications/artika_refashion (new).md | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md index 2f47b1d7..87b73c04 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md @@ -96,18 +96,21 @@ We differ as the only fashion SaaS company in Web3, with a digital platform that | 3. | Backend | Create the backend API and a simple test suit. | | 4. | Simplest Frontend | Create a simple HTML frontend without any styling to gain an idea of our app's requirements for state management. | -#### Milestone 2 — Frontend +#### Milestone 2 — Backend | Number | Deliverable | Specification | | ------ | ---------------- | ------------------------------------------------------------------------------------------- | -| 1. | Flutter Frontend | Create an app using Flutter to create an iOS, Andriod, and desktop using the same codebase. | -| 2. | Smart Contracts | Connect our app to the VeChain mainnet by using the VeChain Thor RESTful API. | - -### Milestone 3 - Marketing, Testing and Community Engagement -| Number | Deliverable | Specification | -| ------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------- | -| 1. | QA Testing | Test the product's basic functionality for logic bugs | -| 2. | User Testing | Get some test users to use the product and note how easy it is for them to use each feature. Get feedback about ease of use. | -| 3. | Fixes | Start the process of incremental changes based on feedback from QA and user testing | +| 1. | Documentation | Create in-depth documentation outlining API functionality (smart contract triggers, user authentication, data management). | +| 2. | back4app | Create resources (API, databases, test data, etc.) on the back4app platform, as outlined in the documentation. | +| 3. | Smart Contracts | Create smart contracts for tracking user history stored on VeChain Thor (conducted on the VeChain testnet by interacting with a public node via the Thorest API). | +| 4. | UI | Create barebones UI in in react native to ensure basic frontend-backend communication. | +| 5. | Unit Testing | Conduct unit testing of all major functions and smart contracts to ensure business logic robustness. | + +### Milestone 3 - Frontend +| Number | Deliverable | Specification | +| ------ | ------------ | --------------------------------------------------------------------------------------------------------- | +| 1. | Build UI | Iteratively build frontend according to design mockups; Done on a per screen basis where functionality is consistent across all platforms. | +| 2. | Connect Backend | Install the ```Parse SDK``` via respective node module and initialize it using App Keys provided on the back4app website. | +| 3. | Functional Testing | Ensure UI interactions propagate through API to trigger smart contracts and testnet updates. Similar testing for traditional database querying and updates. | ### Milestone 4 - Deployment & Marketing | Number | Deliverable | Specification | From a2f37936993250152228febcf428f5281c77e3f2 Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Wed, 20 Dec 2023 19:56:09 -0500 Subject: [PATCH 05/15] Update artika_refashion (new).md --- .../applications/artika_refashion (new).md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md index 87b73c04..68cc1d31 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/artika_refashion (new).md @@ -115,7 +115,7 @@ We differ as the only fashion SaaS company in Web3, with a digital platform that ### Milestone 4 - Deployment & Marketing | Number | Deliverable | Specification | | ------ | --------------- | -------------------------------------------------------------------------------- | -| 1. | Deployment | Deplay the app live for anyone to sign up and use. | +| 1. | Deployment | Deplay app on the App and Google Play Store. Store compliance would have been verified in previous milestone while creating beta builds of the app. | | 2. | Write tutorials | Create blog posts on the website to teach new users how to best use our product. | | 3. | Marketing | Create a marketing campaign to attract new users. | From d02cd0efad7bbefe6475a9c228bd9c141af999ad Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:32:56 -0500 Subject: [PATCH 06/15] Create API Documentation.md Started on api --- .../applications/API Documentation.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md new file mode 100644 index 00000000..ef462f7b --- /dev/null +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md @@ -0,0 +1,59 @@ +# Sozo inFashion API Reference + +## Description +Sozo's REST API is structured in a way that allows developers to easily fetch data, make user-specific updates, and understand the information being provided. All responses are in JSON format and use standard HTTP response codes. + +| Base URL | +| ----------- | +| `https://sozo.api.com` | + +## Endpoints +### Users +**GET** /user/list + +Returns a list of all users. +| Parameter | Type | Description +| ----------- | ----------- | ----------- | +| limit | `integer` | `optional` Maximum number of users to return; Default is 20. | + +**Reponse** + +Returns an array objects containing the following data. +| Key | Type | Description +| ----------- | ----------- | ----------- | +| id | `integer` | Auto-incremented value assigned when user is created in the database | +| username | `string` | The name a user's enters for login; Also the name displayed to other users in the app. | +| role | `string` | A user's role (either "designer" or "client") | + +**Example** + +Request: +``` +GET /users/list?limit=42 +``` +Response: +```json +[ + { + "id": 1, + "username": "DrewDream", + "role": "designer" + }, + { + "id": 2, + "username": "TaylorJ", + "role": "client" + }, + // ... +] +``` + +`POST` + +`DELETE` +*** +### Clients +*** +### Designers +*** +### Sessions From 5f73fd7c185c6d9e88024247228b47c929cd12de Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Thu, 21 Dec 2023 23:18:11 -0500 Subject: [PATCH 07/15] Update API Documentation.md --- .../applications/API Documentation.md | 97 ++++++++++++++++--- 1 file changed, 85 insertions(+), 12 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md index ef462f7b..9487fb87 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md @@ -9,48 +9,121 @@ Sozo's REST API is structured in a way that allows developers to easily fetch da ## Endpoints ### Users -**GET** /user/list +**GET** /designers -Returns a list of all users. +Returns a list of all designer users. | Parameter | Type | Description | ----------- | ----------- | ----------- | -| limit | `integer` | `optional` Maximum number of users to return; Default is 20. | +| limit | `integer` | `optional` Maximum number of designer users to return; Default is 20. | **Reponse** -Returns an array objects containing the following data. +Returns an array of objects containing the following data. | Key | Type | Description | ----------- | ----------- | ----------- | -| id | `integer` | Auto-incremented value assigned when user is created in the database | +| designer_id | `string` | Unique value assigned when user is created in the database. | | username | `string` | The name a user's enters for login; Also the name displayed to other users in the app. | -| role | `string` | A user's role (either "designer" or "client") | +| role | `string` | A user's role (always "designer"). | +| first_name | `string` | A user's first name. | +| last_name | `string` | A user's last name. | +| active_status | `binary` | 1 to indicate active **OR** 0 to indicate not active | **Example** Request: ``` -GET /users/list?limit=42 +GET /designers?limit=42 ``` Response: ```json [ { - "id": 1, + "designer_id": "hTwR4QEXHYPf7Ua6tjjM", "username": "DrewDream", - "role": "designer" + "role": "designer", + "first_name": "Drew", + "last_name": "Thompson" }, { - "id": 2, + "designer_id": "Hfkq7urNonHMonGREKU3", "username": "TaylorJ", - "role": "client" + "role": "designer", + "first_name": "Taylor", + "last_name": "Joslin" }, - // ... + {...} ] ``` +**GET** /designers/:id + +Returns an object representing a single designer user. +| Parameter | +| ----------- | +| No parameters | + +**Reponse** + +Returns a single user object containing the following data. +| Key | Type | Description +| ----------- | ----------- | ----------- | +| designer_id | `string` | Unique value assigned when user is created in the database. | +| username | `string` | The name a user's enters for login; Also the name displayed to other users in the app. | +| role | `string` | A user's role (always "designer"). | +| first_name | `string` | A user's first name. | +| last_name | `string` | A user's last name. | +| active_status | `binary` | 1 to indicate active **OR** 0 to indicate not active | + +**Example** + +Request: +``` +GET /users/4aMvjt3NnNTAeDdM5tri +``` +Response: +```json +{ + "designer_id": "hTwR4QEXHYPf7Ua6tjjM", + "username": "DrewDream", + "role": "designer", + "first_name": "Drew", + "last_name": "Thompson" +} +``` + `POST` `DELETE` + +Returns an object representing a single designer user. +| Parameter | +| ----------- | +| No parameters | + +**Reponse** + +Returns an object containing the following data: +| Key | Type | Description +| ----------- | ----------- | ----------- | +| designer_id | `string` | Unique value assigned when user is created in the database. | +| username | `string` | The name a user's enters for login; Also the name displayed to other users in the app. | +| deleted | `boolean` | `true` to indicate account was successfully deleted **OR** `false` to indicate the account was not deleted. | + +**Example** + +Request: +``` +DELETE /users/4aMvjt3NnNTAeDdM5tri +``` +Response: +```json +{ + "designer_id": "hTwR4QEXHYPf7Ua6tjjM", + "username": "DrewDream", + "deleted": true +} +``` + *** ### Clients *** From 071fa9da634d94a3b5dfa414a538eb81ba51a7cc Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Fri, 22 Dec 2023 11:44:54 -0500 Subject: [PATCH 08/15] Update API Documentation.md --- .../applications/API Documentation.md | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md index 9487fb87..3c5c18fc 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md @@ -8,13 +8,31 @@ Sozo's REST API is structured in a way that allows developers to easily fetch da | `https://sozo.api.com` | ## Endpoints +```http +GET /users +GET /users/{user_id} +POST /users/create +PATCH /users/{user_id} +DELETE /users/{user_id} + +GET /requests/{request_id} +POST /requests +DELETE /requests/{request_id} + +GET /pieces +GET /pieces/{piece_id} +POST /pieces/create +PATCH /pieces/{piece_id} +``` + ### Users -**GET** /designers +**GET** /users Returns a list of all designer users. | Parameter | Type | Description | ----------- | ----------- | ----------- | | limit | `integer` | `optional` Maximum number of designer users to return; Default is 20. | +| role | `string` | `optional` Type of users to return ('designer' or 'client') | **Reponse** @@ -25,8 +43,8 @@ Returns an array of objects containing the following data. | username | `string` | The name a user's enters for login; Also the name displayed to other users in the app. | | role | `string` | A user's role (always "designer"). | | first_name | `string` | A user's first name. | -| last_name | `string` | A user's last name. | -| active_status | `binary` | 1 to indicate active **OR** 0 to indicate not active | +| last_name | `string` | A user's last name. | +| active_status | `number` | 1 to indicate active **OR** 0 to indicate not active | **Example** From a9b69a780369f64b8fe85c6638033ea85aaf9280 Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:13:30 -0500 Subject: [PATCH 09/15] Update API Documentation.md All user-related endpoints done. --- .../applications/API Documentation.md | 189 ++++++++++++++---- 1 file changed, 145 insertions(+), 44 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md index 3c5c18fc..cdb71690 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md @@ -24,58 +24,66 @@ GET /pieces/{piece_id} POST /pieces/create PATCH /pieces/{piece_id} ``` +*** +## Users -### Users **GET** /users Returns a list of all designer users. | Parameter | Type | Description -| ----------- | ----------- | ----------- | +| ----------- | :-----------: | ----------- | | limit | `integer` | `optional` Maximum number of designer users to return; Default is 20. | | role | `string` | `optional` Type of users to return ('designer' or 'client') | -**Reponse** +**Response** Returns an array of objects containing the following data. | Key | Type | Description -| ----------- | ----------- | ----------- | -| designer_id | `string` | Unique value assigned when user is created in the database. | -| username | `string` | The name a user's enters for login; Also the name displayed to other users in the app. | -| role | `string` | A user's role (always "designer"). | +| ----------- | :-----------: | ----------- | +| user_id | `string` | Unique value assigned when user is created in the database. | +| username | `string` | A user's display name; Also used for login. | +| email | `string` | A user's email address. | +| role | `string` | A user's role ('designer' or 'client'). | | first_name | `string` | A user's first name. | | last_name | `string` | A user's last name. | -| active_status | `number` | 1 to indicate active **OR** 0 to indicate not active | +| bio | `string` | A description of the user. | +| active_status | `number` | 1 indicates **active** **OR** 0 indicates **not active** | **Example** Request: -``` -GET /designers?limit=42 +```http +GET /users?limit=2 ``` Response: ```json [ { - "designer_id": "hTwR4QEXHYPf7Ua6tjjM", - "username": "DrewDream", - "role": "designer", - "first_name": "Drew", - "last_name": "Thompson" + "user_id": "hTwR4QEXHYPf7Ua6tjjM", + "username": "DrewDream", + "email": "dreamlife@yahoo.com", + "role": "designer", + "first_name": "Drew", + "last_name": "Thompson" + "bio": "Bold stitches, fierce fabrics. Transforming threads into masterpieces. 🧵✨ #FashionAlchemy #StyleVisionary", + "active_status": 1 }, { - "designer_id": "Hfkq7urNonHMonGREKU3", - "username": "TaylorJ", - "role": "designer", - "first_name": "Taylor", - "last_name": "Joslin" - }, - {...} + "user_id": "Hfkq7urNonHMonGREKU3", + "username": "TaylorJ", + "email": "taylor.joslin@gmail.com", + "role": "client", + "first_name": "Taylor", + "last_name": "Joslin", + "bio": "Dedicated to refining elegance through precision. Crafting timeless designs with meticulous attention to detail. Fashion designer focused on timeless style.", + "active_status": 1 + } ] ``` +*** +**GET** /users/{user_id} -**GET** /designers/:id - -Returns an object representing a single designer user. +Retrieve a single user account. | Parameter | | ----------- | | No parameters | @@ -84,36 +92,131 @@ Returns an object representing a single designer user. Returns a single user object containing the following data. | Key | Type | Description -| ----------- | ----------- | ----------- | -| designer_id | `string` | Unique value assigned when user is created in the database. | -| username | `string` | The name a user's enters for login; Also the name displayed to other users in the app. | -| role | `string` | A user's role (always "designer"). | +| ----------- | :-----------: | ----------- | +| user_id | `string` | Unique value assigned when user is created in the database. | +| username | `string` | A user's display name. | +| email | `string` | A user's email address. | +| role | `string` | A user's role ('designer' or 'client'). | | first_name | `string` | A user's first name. | | last_name | `string` | A user's last name. | -| active_status | `binary` | 1 to indicate active **OR** 0 to indicate not active | +| bio | `string` | A description of the user (max length: 200 characters). | +| active_status | `number` | 1 indicates **active** **OR** 0 indicates **not active** | **Example** Request: -``` -GET /users/4aMvjt3NnNTAeDdM5tri +```http +GET /users/hTwR4QEXHYPf7Ua6tjjM ``` Response: ```json { - "designer_id": "hTwR4QEXHYPf7Ua6tjjM", + "user_id": "hTwR4QEXHYPf7Ua6tjjM", "username": "DrewDream", "role": "designer", "first_name": "Drew", - "last_name": "Thompson" + "last_name": "Thompson", + "bio": "Bold stitches, fierce fabrics. Transforming threads into masterpieces. 🧵✨ #FashionAlchemy #StyleVisionary", + "active_status": 1 } ``` +*** +**POST** /users/create + +Creates a new user account. +| Parameter | Type | Description +| ----------- | :-----------: | ----------- | +| username | `string` | `required` A user's display name. Does not allow special chatacters; Can be used for login. | +| email | `string` | `required` A user's email address; Can be used for login. | +| role | `string` | `required` A user's role ('designer' or 'client'). | +| first_name | `string` | `required` A user's first name. | +| last_name | `string` | `required` A user's last name. | +| bio | `string` | `optional` A description of the user (max length: 200 characters). | -`POST` +**Response** -`DELETE` +Returns a single user object containing the following data. -Returns an object representing a single designer user. +| Key | Type | Description +| ----------- | ----------- | ----------- | +| user_id | `string` | Unique value assigned when user is created in the database. | +| username | `string` | A user's display name. | +| email | `string` | A user's email address. | +| role | `string` | A user's role ('designer' or 'client'). | +| first_name | `string` | A user's first name. | +| last_name | `string` | A user's last name. | +| bio | `string` | A description of the user. | +| active_status | `number` | 1 indicates **active** **OR** 0 indicates **not active** | + +**Example** + +Request: +```http +POST /users/create?username=RachelY&email=rachel.yearny%40gmail.com&role=client&first_name=Rachel&last_name=Yearny +``` +Response: +```json +{ + "user_id": "H094iAjZyPWr4rm0y9WL", + "username": "RachelY", + "email": "rachel.yearny@gmail.com", + "role": "client", + "first_name": "Rachel", + "last_name": "Yearny", + "bio": "", + "active_status": 1 +} +``` +*** +**PATCH** /users/{user_id} + +Update parts of a user's profile information. +| Parameter | Type | Description +| ----------- | :-----------: | ----------- | +| username | `string` | `optional` A user's display name. Does not allow special chatacters; Can be used for login. | +| email | `string` | `optional` A user's email address. | +| first_name | `string` | `optional` A user's first name. | +| last_name | `string` | `optional` A user's last name. | +| bio | `string` | `optional` A description of the user. | + +**Response** + +Returns a single user object containing the following data. + +| Key | Type | Description +| ----------- | ----------- | ----------- | +| user_id | `string` | Unique value assigned when user is created in the database. | +| username | `string` | A user's display name. | +| email | `string` | A user's email address. | +| role | `string` | A user's role ('designer' or 'client'). | +| first_name | `string` | A user's first name. | +| last_name | `string` | A user's last name. | +| bio | `string` | A description of the user. | +| active_status | `number` | 1 indicates **active** **OR** 0 indicates **not active** | + +**Example** + +Request: +```http +PATCH /users/H094iAjZyPWr4rm0y9WL?username=YearOfRachel&bio="Sculpting%20sophistication%20in%20every%20stitch.%20Empowering%20women%20through%20distinctive%20designs.%20Committed%20to%20redefining%20style%20with%20grace%20and%20purpose." +``` +Response: +```json +{ + "user_id": "H094iAjZyPWr4rm0y9WL", + "username": "YearOfRachel", + "email": "rachel.yearny@gmail.com", + "role": "client", + "first_name": "Rachel", + "last_name": "Yearny", + "bio": "Sculpting sophistication in every stitch. Empowering women through distinctive designs. Committed to redefining style with grace and purpose.", + "active_status": 1 +} +``` +*** +**DELETE** /users/{user_id} + +Returns an object representing a single user. | Parameter | | ----------- | | No parameters | @@ -123,15 +226,15 @@ Returns an object representing a single designer user. Returns an object containing the following data: | Key | Type | Description | ----------- | ----------- | ----------- | -| designer_id | `string` | Unique value assigned when user is created in the database. | -| username | `string` | The name a user's enters for login; Also the name displayed to other users in the app. | +| user_id | `string` | Unique value assigned when user is created in the database. | +| username | `string` | A user's display name. | | deleted | `boolean` | `true` to indicate account was successfully deleted **OR** `false` to indicate the account was not deleted. | **Example** Request: ``` -DELETE /users/4aMvjt3NnNTAeDdM5tri +DELETE /users/hTwR4QEXHYPf7Ua6tjjM ``` Response: ```json @@ -141,10 +244,8 @@ Response: "deleted": true } ``` - *** -### Clients +### Requests *** -### Designers +### Pieces *** -### Sessions From 3c587a795f8d74d9d94c310c643111b54f97d783 Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:03:33 -0500 Subject: [PATCH 10/15] Update API Documentation.md --- .../applications/API Documentation.md | 290 +++++++++++++++++- 1 file changed, 281 insertions(+), 9 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md index cdb71690..c9dfc6f3 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md @@ -15,9 +15,9 @@ POST /users/create PATCH /users/{user_id} DELETE /users/{user_id} -GET /requests/{request_id} -POST /requests -DELETE /requests/{request_id} +GET /jobs/{job_id} +POST /jobs/create +POST /jobs/{job_id}/cancel GET /pieces GET /pieces/{piece_id} @@ -29,7 +29,7 @@ PATCH /pieces/{piece_id} **GET** /users -Returns a list of all designer users. +Returns a list of all users. | Parameter | Type | Description | ----------- | :-----------: | ----------- | | limit | `integer` | `optional` Maximum number of designer users to return; Default is 20. | @@ -81,6 +81,7 @@ Response: ] ``` *** + **GET** /users/{user_id} Retrieve a single user account. @@ -121,6 +122,7 @@ Response: } ``` *** + **POST** /users/create Creates a new user account. @@ -152,7 +154,17 @@ Returns a single user object containing the following data. Request: ```http -POST /users/create?username=RachelY&email=rachel.yearny%40gmail.com&role=client&first_name=Rachel&last_name=Yearny +POST /users/create +``` +Request Body: +```json +{ + "username": "RachelY", + "email": "rachel.yearny@gmail.com", + "role": "client", + "first_name": "Rachel", + "last_name": "Yearney" +} ``` Response: ```json @@ -168,7 +180,8 @@ Response: } ``` *** -**PATCH** /users/{user_id} + +**PATCH** /users/{user_id} HTTP/1.1 Update parts of a user's profile information. | Parameter | Type | Description @@ -198,7 +211,14 @@ Returns a single user object containing the following data. Request: ```http -PATCH /users/H094iAjZyPWr4rm0y9WL?username=YearOfRachel&bio="Sculpting%20sophistication%20in%20every%20stitch.%20Empowering%20women%20through%20distinctive%20designs.%20Committed%20to%20redefining%20style%20with%20grace%20and%20purpose." +PATCH /users/H094iAjZyPWr4rm0y9WL +``` +Request Body: +```json +{ + "username": "YearOfRachel", + "bio": "Sculpting sophistication in every stitch. Empowering women through distinctive designs. Committed to redefining style with grace and purpose." +} ``` Response: ```json @@ -214,9 +234,10 @@ Response: } ``` *** + **DELETE** /users/{user_id} -Returns an object representing a single user. +Deletes a single user from the database. | Parameter | | ----------- | | No parameters | @@ -245,7 +266,258 @@ Response: } ``` *** -### Requests + +### Jobs +**GET** /jobs/{job_id} + +Retrieve details of a single job, established between a client and designer user. +| Parameter | +| ----------- | +| No parameters | + +**Reponse** + +Returns a single job object containing the following data. +| Key | Type | Description +| ----------- | :-----------: | ----------- | +| job_id | `string` | Unique value assigned when a job is created. | +| client_id | `string` | A client user's unique id. | +| designer_id | `string` | A designer user's unique id. | +| payment_status | `string` | Status of payment for job. Possible values are `not paid` `pending` or `paid`. | +| active_status | `number` | 1 indicates **active** **OR** 0 indicates **not active** | + +**Example** + +Request: +```http +GET /jobs/uD7uQ4xjuCT9spwhyNVRxiYk9 +``` +Response: +```json +{ + "job_id": "uD7uQ4xjuCT9spwhyNVRxiYk9", + "client_id": "Hfkq7urNonHMonGREKU3", + "designer_id": "hTwR4QEXHYPf7Ua6tjjM", + "payment_status": "not paid", + "active_status": 1 +} +``` *** + +**POST** /jobs/create + +Creates a new job. +| Parameter | Type | Description +| ----------- | :-----------: | ----------- | +| client_id | `string` | A client user's unique id. | +| designer_id | `string` | A designer user's unique id. | + +**Response** + +Returns a single job object containing the following data. + +| Key | Type | Description +| ----------- | ----------- | ----------- | +| job_id | `string` | Unique value assigned when a job is created. | +| client_id | `string` | A client user's unique id. | +| designer_id | `string` | A designer user's unique id. | +| payment_status | `string` | Status of payment for job. Possible values are `not paid` `pending` or `paid`. | +| active_status | `number` | Indicates whether a job is active; 1 is **active** **OR** 0 is **not active** | + +**Example** + +Request: +```http +POST /jobs/create +``` +Request Body: +```json +{ + "client_id": "Hfkq7urNonHMonGREKU3", + "designer_id": "hTwR4QEXHYPf7Ua6tjjM" +} +``` +Response: +```json +{ + "job_id": "uD7uQ4xjuCT9spwhyNVRxiYk9", + "client_id": "Hfkq7urNonHMonGREKU3", + "designer_id": "hTwR4QEXHYPf7Ua6tjjM", + "payment_status": "not paid", + "active_status": 1 +} +``` +*** + +**POST** /jobs/{job_id}/cancel + +Cancels an active job; The job must be in a cancelabe state (active_status == 1 && payment_status == "not paid"). +| Parameter | +| ----------- | +| No parameters | + +**Reponse** + +Returns a single job object if the request was successful. Returns an error if the job is not in a cancelable state. +| Key | Type | Description +| ----------- | :-----------: | ----------- | +| job_id | `string` | Unique value assigned when a job is created. | +| client_id | `string` | A client user's unique id. | +| designer_id | `string` | A designer user's unique id. | +| payment_status | `string` | Status of payment for job. Possible values are `not paid` `pending` or `paid`. | +| active_status | `number` | 1 indicates **active** **OR** 0 indicates **not active** | + +**Example** + +Request: +``` +POST /jobs/{job_id}/cancel +``` +Response: +```json +{ + "job_id": "uD7uQ4xjuCT9spwhyNVRxiYk9", + "client_id": "Hfkq7urNonHMonGREKU3", + "designer_id": "hTwR4QEXHYPf7Ua6tjjM", + "payment_status": "not paid", + "active_status": 0 +} +``` +*** + ### Pieces *** +**GET** /pieces + +Returns a list of all designer users. +| Parameter | Type | Description +| ----------- | :-----------: | ----------- | +| limit | `integer` | `optional` Maximum number of designer users to return; Default is 20. | + +**Response** + +Returns an array of objects representing pieces created by designers. Each object contains the following data. +| Key | Type | Description +| ----------- | :-----------: | ----------- | +| piece_id | `string` | Unique value assigned when a piece in the database. | +| designer_id | `string` | A designer user's unique id. | +| piece_name | `string` | A piece's name. Determined by the designer. | +| image_name | `string` | Name of the image uploaded for the piece. | +| description | `string` | A description of the piece. | + +**Example** + +Request: +```http +GET /pieces?limit=2 +``` +Response: +```json +[ + { + "piece_id": "hgmjw3vx4bfnQs9", + "designer_id": "hTwR4QEXHYPf7Ua6tjjM", + "piece_name": "Stars & Spangles", + "image_name": "hgmjw3vx4bfnQs9.jpg", + "description": "Unveiling the \"Stars & Spangles\" hoodie: a premium cotton masterpiece embodying the spirit of the United States. Vibrant stars and stripes meticulously dance across this garment, a dynamic celebration of American pride. Perfect for Independence Day or any occasion, this hoodie seamlessly merges style with patriotism. Wear the colors that echo the nation's heartbeat, making the Stars & Spangles a timeless symbol of your love for the land of the free." + }, + { + "piece_id": "AgiUjJGhhKtX3oY", + "designer_id": "NRDF8FB61BuYThN2scFA", + "piece_name": "Stars & Spangles", + "image_name": "AgiUjJGhhKtX3oY.jpg", + "description": "\"The Raven's Veil\" is a bewitching cloak that cascades in mysterious ebony folds. Embroidered ravens soar across the midnight fabric, their feathers intricately detailed in silver thread. The garment whispers tales of ancient lore, weaving elegance with an enigmatic edge. Embrace the mystique, as the Raven's Veil envelops you in a silhouette of shadowed allure." + } +] +``` +*** + +**POST** /pieces/create + +Creates a piece. +| Parameter | Type | Description +| ----------- | :-----------: | ----------- | +| piece_name | `string` | `required` A piece's name. | +| image_name | `string` | `required` Name of the image uploaded for the piece. | +| description | `string` | `optional` A description of the piece (max length: 400 characters). | + +**Response** + +Returns a single piece object containing the following data. +| Key | Type | Description +| ----------- | ----------- | ----------- | +| piece_id | `string` | Unique value assigned when a piece in the database. | +| designer_id | `string` | A designer user's unique id. | +| piece_name | `string` | A piece's name. Determined by the designer. | +| image_name | `string` | Name of the image uploaded for the piece. | +| description | `string` | A description of the piece. | + +**Example** + +Request: +```http +POST /users/create +``` +Request Body: +```json +{ + "piece_name": "Red Monty", + "image_name": "IMG_46.jpg", + "description": "" +} +``` +Response: +```json +{ + "piece_id": "1rjJDBYmLo5pgT7", + "designer_id": "YRmNWCQuQdAWbR8u7eP4", + "piece_name": "Red Monty", + "image_name": "1rjJDBYmLo5pgT7.jpg", + "description": "" + } +``` +*** + +**PATCH** /pieces/{piece_id} HTTP/1.1 + +Updates information for a specific piece. +| Parameter | Type | Description +| ----------- | :-----------: | ----------- | +| piece_name | `string` | `optional` A piece's name. | +| image_name | `string` | `optional` Name of the image uploaded for the piece. | +| description | `string` | `optional` A description of the piece (max length: 400 characters). | + +**Response** + +Returns a single piece object containing the following data. +| Key | Type | Description +| ----------- | ----------- | ----------- | +| piece_id | `string` | Unique value assigned when a piece in the database. | +| designer_id | `string` | A designer user's unique id. | +| piece_name | `string` | A piece's name. Determined by the designer. | +| image_name | `string` | Name of the image uploaded for the piece. | +| description | `string` | A description of the piece. | + +**Example** + +Request: +```http +PATCH /users/H094iAjZyPWr4rm0y9WL +``` +Request Body: +```json +{ + "piece_name": "Red Python", + "description": "This sizzling masterpiece entwines the fierce allure of red with a sleek python pattern. The sultry silhouette, adorned with glistening serpent scales, invites you to embrace the wild side. A bold statement, embodying passion and power in every slither." +} +``` +Response: +```json +{ + "piece_id": "1rjJDBYmLo5pgT7", + "designer_id": "YRmNWCQuQdAWbR8u7eP4", + "piece_name": "Red Python", + "image_name": "1rjJDBYmLo5pgT7.jpg", + "description": "This sizzling masterpiece entwines the fierce allure of red with a sleek python pattern. The sultry silhouette, adorned with glistening serpent scales, invites you to embrace the wild side. A bold statement, embodying passion and power in every slither." +} +``` From 0449acd60268820a369e38b49aeae279188c1556 Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:04:16 -0500 Subject: [PATCH 11/15] Update API Documentation.md --- .../applications/API Documentation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md index c9dfc6f3..46c0b4ef 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md @@ -267,7 +267,7 @@ Response: ``` *** -### Jobs +## Jobs **GET** /jobs/{job_id} Retrieve details of a single job, established between a client and designer user. @@ -385,7 +385,7 @@ Response: ``` *** -### Pieces +## Pieces *** **GET** /pieces From d0294c52611a49660176081cff1711ff737a029d Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:07:20 -0500 Subject: [PATCH 12/15] Update API Documentation.md --- .../applications/API Documentation.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md index 46c0b4ef..fd6672dc 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md @@ -128,12 +128,12 @@ Response: Creates a new user account. | Parameter | Type | Description | ----------- | :-----------: | ----------- | -| username | `string` | `required` A user's display name. Does not allow special chatacters; Can be used for login. | -| email | `string` | `required` A user's email address; Can be used for login. | -| role | `string` | `required` A user's role ('designer' or 'client'). | -| first_name | `string` | `required` A user's first name. | -| last_name | `string` | `required` A user's last name. | -| bio | `string` | `optional` A description of the user (max length: 200 characters). | +| username | `string` | `required` User's display name. Does not allow special chatacters; Can be used for login. | +| email | `string` | `required` User's email address; Can be used for login. | +| role | `string` | `required` User's role ('designer' or 'client'). | +| first_name | `string` | `required` User's first name. | +| last_name | `string` | `required` User's last name. | +| bio | `string` | `optional` Description of the user (max length: 200 characters). | **Response** @@ -142,12 +142,12 @@ Returns a single user object containing the following data. | Key | Type | Description | ----------- | ----------- | ----------- | | user_id | `string` | Unique value assigned when user is created in the database. | -| username | `string` | A user's display name. | -| email | `string` | A user's email address. | -| role | `string` | A user's role ('designer' or 'client'). | -| first_name | `string` | A user's first name. | -| last_name | `string` | A user's last name. | -| bio | `string` | A description of the user. | +| username | `string` | User's display name. | +| email | `string` | User's email address. | +| role | `string` | User's role ('designer' or 'client'). | +| first_name | `string` | User's first name. | +| last_name | `string` | User's last name. | +| bio | `string` | Description of the user. | | active_status | `number` | 1 indicates **active** **OR** 0 indicates **not active** | **Example** @@ -211,7 +211,7 @@ Returns a single user object containing the following data. Request: ```http -PATCH /users/H094iAjZyPWr4rm0y9WL +PATCH /users/H094iAjZyPWr4rm0y9WL HTTP/1.1 ``` Request Body: ```json @@ -254,7 +254,7 @@ Returns an object containing the following data: **Example** Request: -``` +```http DELETE /users/hTwR4QEXHYPf7Ua6tjjM ``` Response: From 5b4f6ebfef4807e1817ec2fccca9ff6b5d8d3390 Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:09:55 -0500 Subject: [PATCH 13/15] Update API Documentation.md --- .../applications/API Documentation.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md index fd6672dc..dabb65dc 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md @@ -281,8 +281,8 @@ Returns a single job object containing the following data. | Key | Type | Description | ----------- | :-----------: | ----------- | | job_id | `string` | Unique value assigned when a job is created. | -| client_id | `string` | A client user's unique id. | -| designer_id | `string` | A designer user's unique id. | +| client_id | `string` | Client user's unique id. | +| designer_id | `string` | Designer user's unique id. | | payment_status | `string` | Status of payment for job. Possible values are `not paid` `pending` or `paid`. | | active_status | `number` | 1 indicates **active** **OR** 0 indicates **not active** | @@ -309,8 +309,8 @@ Response: Creates a new job. | Parameter | Type | Description | ----------- | :-----------: | ----------- | -| client_id | `string` | A client user's unique id. | -| designer_id | `string` | A designer user's unique id. | +| client_id | `string` | `required` Client user's unique id. | +| designer_id | `string` | `required` Designer user's unique id. | **Response** From bf5ef0369162667eabfb7c9b4675d706195130a6 Mon Sep 17 00:00:00 2001 From: KShervington <54691558+KShervington@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:12:54 -0500 Subject: [PATCH 14/15] Update API Documentation.md --- .../applications/API Documentation.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md index dabb65dc..54234937 100644 --- a/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md +++ b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/API Documentation.md @@ -27,7 +27,7 @@ PATCH /pieces/{piece_id} *** ## Users -**GET** /users +**GET** _/users_ Returns a list of all users. | Parameter | Type | Description @@ -82,7 +82,7 @@ Response: ``` *** -**GET** /users/{user_id} +**GET** _/users/{user_id}_ Retrieve a single user account. | Parameter | @@ -123,7 +123,7 @@ Response: ``` *** -**POST** /users/create +**POST** _/users/create_ Creates a new user account. | Parameter | Type | Description @@ -181,7 +181,7 @@ Response: ``` *** -**PATCH** /users/{user_id} HTTP/1.1 +**PATCH** _/users/{user_id}_ HTTP/1.1 Update parts of a user's profile information. | Parameter | Type | Description @@ -235,7 +235,7 @@ Response: ``` *** -**DELETE** /users/{user_id} +**DELETE** _/users/{user_id}_ Deletes a single user from the database. | Parameter | @@ -268,7 +268,7 @@ Response: *** ## Jobs -**GET** /jobs/{job_id} +**GET** _/jobs/{job_id}_ Retrieve details of a single job, established between a client and designer user. | Parameter | @@ -304,7 +304,7 @@ Response: ``` *** -**POST** /jobs/create +**POST** _/jobs/create_ Creates a new job. | Parameter | Type | Description @@ -349,7 +349,7 @@ Response: ``` *** -**POST** /jobs/{job_id}/cancel +**POST** _/jobs/{job_id}/cancel_ Cancels an active job; The job must be in a cancelabe state (active_status == 1 && payment_status == "not paid"). | Parameter | @@ -370,7 +370,7 @@ Returns a single job object if the request was successful. Returns an error if t **Example** Request: -``` +```http POST /jobs/{job_id}/cancel ``` Response: @@ -386,8 +386,8 @@ Response: *** ## Pieces -*** -**GET** /pieces + +**GET** _/pieces_ Returns a list of all designer users. | Parameter | Type | Description @@ -432,7 +432,7 @@ Response: ``` *** -**POST** /pieces/create +**POST** _/pieces/create_ Creates a piece. | Parameter | Type | Description @@ -478,7 +478,7 @@ Response: ``` *** -**PATCH** /pieces/{piece_id} HTTP/1.1 +**PATCH** _/pieces/{piece_id}_ HTTP/1.1 Updates information for a specific piece. | Parameter | Type | Description From b92d120b01eb3295b0f0de8a7acfb224fec361d4 Mon Sep 17 00:00:00 2001 From: KShervington Date: Fri, 12 Jan 2024 20:16:36 -0500 Subject: [PATCH 15/15] Moved application file to correct folder --- .../applications}/sozo_infashion.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {applications => Vechain-EasyA-Hackathon-Boston-Oct-2023/applications}/sozo_infashion.md (100%) diff --git a/applications/sozo_infashion.md b/Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/sozo_infashion.md similarity index 100% rename from applications/sozo_infashion.md rename to Vechain-EasyA-Hackathon-Boston-Oct-2023/applications/sozo_infashion.md