snowballtools-base/packages/frontend/src
Vivian Phung a684743bd6
feat(template projects): generate git repo on backend (#218)
### TL;DR

- Still cretaes app if user migrates from page

The PR introduces a new `AddProjectFromTemplate` mutation to facilitate project creation using a repository template. This change centralizes the template project creation logic within the backend, improving code maintainability by removing redundant client-side code.

### What changed?
- Added `AddProjectFromTemplate` input type in `schema.gql` and corresponding TypeScript interfaces.
- Implemented `addProjectFromTemplate` resolver with error handling and Octokit integration for repository creation.
- Updated `service.ts` to include the new `addProjectFromTemplate` method.
- Created new GraphQL `Mutation` for `addProjectFromTemplate` in the GraphQL schema.
- Adjusted the client-side GQLClient to support the new mutation.
- Modified frontend to utilize the new backend mutation for project creation from a template.

### How to test?
1. Ensure your backend server is running.
2. Use a GraphQL client like Postman to call the `addProjectFromTemplate` mutation with appropriate input.
3. Verify that the new project is created using the specified template, and appropriate error messages are returned for failures.
4. Check the frontend flow for creating a project from a template to ensure it is working correctly.

### Why make this change?
This change enhances code maintainability by centralizing template project creation logic within the backend, thereby reducing redundancy and potential inconsistencies in client-side implementations.

---
2024-06-24 18:38:01 -04:00
..
assets Refactor: Env to utils/constants (#210) 2024-06-21 21:07:41 -04:00
components Refactor: VerifyCodeInput Component and Modify Access Code Validation (#212) 2024-06-21 21:13:32 -04:00
context Refactor: Env to utils/constants (#210) 2024-06-21 21:07:41 -04:00
layouts format prettier 2024-05-09 16:18:52 -04:00
pages feat(template projects): generate git repo on backend (#218) 2024-06-24 18:38:01 -04:00
stories chore(storybook): icons to correct folder (#216) 2024-06-22 17:27:37 -04:00
types GeneralTabPanel cleanup 2024-05-14 19:36:50 +00:00
utils Feat: Access Code Authentication Flow (#211) 2024-06-21 21:10:31 -04:00
App.test.tsx Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
App.tsx Refactor: Env to utils/constants (#210) 2024-06-21 21:07:41 -04:00
constants.ts Add project create template for image upload PWA (#109) 2024-02-26 17:54:35 +05:30
index.css format prettier 2024-05-09 16:18:52 -04:00
index.tsx Refactor: Env to utils/constants (#210) 2024-06-21 21:07:41 -04:00
logo.svg Restore https://github.com/snowball-tools/snowballtools-base/pull/103 (#106) 2024-02-23 16:09:45 -06:00
react-app-env.d.ts Create react app with tailwind, typescript, eslint and prettier (#4) 2023-12-08 10:50:55 +05:30
reportWebVitals.ts Create react app with tailwind, typescript, eslint and prettier (#4) 2023-12-08 10:50:55 +05:30
setupTests.ts Create react app with tailwind, typescript, eslint and prettier (#4) 2023-12-08 10:50:55 +05:30