{"id":25171453,"url":"https://github.com/basemax/onboardinggraphqlts","last_synced_at":"2026-04-13T17:34:09.971Z","repository":{"id":186168367,"uuid":"669884592","full_name":"BaseMax/OnboardingGraphQLTS","owner":"BaseMax","description":"This is a sample application that demonstrates a multi-step registration process using GraphQL and NestJS.","archived":false,"fork":false,"pushed_at":"2024-06-18T12:06:20.000Z","size":1380,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T17:08:10.425Z","etag":null,"topics":["graphql","graphql-javascript","graphql-typescript","javascript","javascript-graphql","js","ts","typescript","typescript-graphql"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-23T18:37:19.000Z","updated_at":"2024-01-17T12:20:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"e454144f-250a-48ef-8e76-76d736eb3182","html_url":"https://github.com/BaseMax/OnboardingGraphQLTS","commit_stats":null,"previous_names":["basemax/onboardinggraphqlts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FOnboardingGraphQLTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FOnboardingGraphQLTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FOnboardingGraphQLTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FOnboardingGraphQLTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/OnboardingGraphQLTS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247079306,"owners_count":20880030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","graphql-javascript","graphql-typescript","javascript","javascript-graphql","js","ts","typescript","typescript-graphql"],"created_at":"2025-02-09T09:20:29.440Z","updated_at":"2026-04-13T17:34:09.942Z","avatar_url":"https://github.com/BaseMax.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Onboarding GraphQL TS\n\nThis is a sample application that demonstrates a multi-step registration process using GraphQL and NestJS.\n\n## Features\n\n- User Management\n  - Registration\n  - Login\n  - Email Verification\n  - Authentication \u0026 Authorization\n- Form\n  - Set Forms For Each Step Of Registration\n  - Update Forms\n  - Retrieve Form For Step(s)\n- Files\n  - Upload File(s) For Each Form\n  - Update File(s) For Each Form\n  - Delete FIle(s) For Each Form\n\n## Technologies Used\n\nThis project uses the following technologies:\n\n- **GraphQL**: GraphQL is a query language for APIs and a runtime for executing queries with your existing data. It provides a more efficient and flexible alternative to traditional REST APIs.\n\n- **NestJS**: NestJS is a progressive Node.js framework for building efficient, scalable, and reliable server-side applications. It is built with TypeScript and leverages modern JavaScript features and design patterns.\n\n- **PostgreSQL**: PostgreSQL is a powerful and open-source relational database management system. It offers scalable, reliable, and high-performance storage for your application's data.\n\n- **Prisma**: Prisma is an open-source database toolkit that simplifies database access and management. It provides an intuitive API for database queries, migrations, and schema management.\n\n- **Apollo Server**: Apollo Server is a GraphQL server implementation for Node.js. It allows you to build GraphQL APIs with ease, providing features like schema generation, resolvers, and data fetching.\n\n- **JWT (JSON Web Tokens)**: JWT is an open standard for securely transmitting information between parties as a JSON object. It is commonly used for authentication and authorization purposes in web applications.\n\n- **Jest**: Jest is a JavaScript testing framework that is widely used for testing JavaScript applications, including NestJS projects. It provides a simple and intuitive API for writing unit tests, integration tests, and end-to-end tests.\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/BaseMax/OnboardingGraphQLTS.git\n   ```\n\n2. Navigate into the project directory:\n\n   ```bash\n   cd OnboardingGraphQLTS\n   ```\n\n3. Install the dependencies:\n\n   ```bash\n   npm install\n   ```\n\n4. Set up your PostgreSQL database and update the database connection settings in the `.env` file(use `.env.sample`).\n\n5. Run the migration to create the database tables:\n\n   ```bash\n   npx prisma migrate dev\n   ```\n\n6. Start the server:\n\n   ```bash\n   npm run start:dev\n   ```\n\n7. The app will now be running at `http://localhost:3000`.\n\n## Testing\n\nThis project includes unit tests and integration tests for the backend functionality.\n\nTo run the tests, use the following command:\n\n```bash\nnpm test\n```\n\nJest will execute all the tests and display the results.\n\n## Demo\n\n![register](./screenshots/register.png)\n![invalid register](./screenshots/invalid_register.png)\n![login](./screenshots/login.png)\n![invalid login](./screenshots/invalid_login.png)\n![resend email](./screenshots/resend_email.png)\n![get user](./screenshots/user.png)\n![get form](./screenshots/get_form.png)\n![create form](./screenshots/create_form.png)\n![update form](./screenshots/update_form.png)\n\n## Graphql Schema ,Queries and Mutations\n\nYou can get full Graphql file schema in `/src/schema.gql` file\n\n### Queries\n\n- user\n  Fetch user and his/her forms\n- isPhoneExist\n  return true if user with this phone exists\n- isEmailExist\n  return true if user with this email exists email exists\n\n```graphql\ntype Query {\n  user(email: String, phone: String): User\n  isEmailExist(email: String!): Boolean!\n  isPhoneExist(phone: String!): Boolean!\n}\n```\n\n### Mutations\n\n- register\n  register user with correct credentials `RegisterInput`\n- login\n  login to account with correct credentials `LoginInput`\n- resendVerification\n  resend email to unverified user\n- createOrUpdateForm\n  create or update form with `createFormInput` input\n\n```graphql\ntype Mutation {\n  register(registerInput: RegisterInput!): AuthToken!\n  login(loginInput: LoginInput!): AuthToken!\n  resendVerificationToken(email: String!): EmailMessage!\n  createOrUpdateFrom(createFormInput: CreateFormInput!): Form!\n}\n```\n\n### Types\n\n- Form\n  user form type for each step of registration\n- User\n  user model with account information\n- AuthToken\n  output type for register/login mutation\n- Email Message\n  output type for resendEmailVerification mutation\n\n```graphql\ntype Form {\n  id: Int!\n  step: Int!\n  userId: Int!\n  field: String!\n  value: String!\n  createdAt: DateTime!\n  updatedAt: DateTime!\n}\n\ntype User {\n  id: Int!\n  f_name: String!\n  l_name: String!\n  email: String!\n  phone: String!\n  post_code: String!\n  country: String!\n  address_detail: String!\n  email_verified: Boolean!\n  languages: [String!]!\n  createdAt: DateTime!\n  updatedAt: DateTime!\n  forms(steps: [Int!]!): [Form!]!\n}\n\ntype AuthToken {\n  token: String!\n}\n\ntype EmailMessage {\n  message: String!\n  email_sent: Boolean!\n}\n```\n\n### Inputs\n\n- RegisterInput\n  register input (register dto) for register mutation\n- LoginInput\n  login input (login dto) for login mutation\n- CreateFormInput\n  create form input (form dto) for each step form\n\n```graphql\ninput RegisterInput {\n  f_name: String!\n  l_name: String!\n  email: String!\n  phone: String!\n  password: String!\n  post_code: String!\n  country: String!\n  address_detail: String!\n  language: [String!]!\n}\n\ninput LoginInput {\n  email: String!\n  password: String!\n}\n\ninput CreateFormInput {\n  field: String!\n  value: String!\n  step: Int!\n}\n```\n\n## Documentation\n\nFeel free to check `onBoardGraphQLTS.postman_collection.json` file and import it into your Postman.\n\nCopyright 2023, Max Base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fonboardinggraphqlts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fonboardinggraphqlts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fonboardinggraphqlts/lists"}