{"id":21667077,"url":"https://github.com/princemuel/invoicetracker-api","last_synced_at":"2026-04-11T15:34:24.945Z","repository":{"id":65534489,"uuid":"589397382","full_name":"princemuel/invoicetracker-api","owner":"princemuel","description":"the backend repo of my invoice mail web application  (still under development)","archived":false,"fork":false,"pushed_at":"2023-12-14T23:23:02.000Z","size":829,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T06:48:14.624Z","etag":null,"topics":["apollo-server","express","graphql","immer","nexus","nodejs","prisma","typescript"],"latest_commit_sha":null,"homepage":"https://invoicemailer.onrender.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/princemuel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-16T02:13:54.000Z","updated_at":"2023-08-28T02:32:19.000Z","dependencies_parsed_at":"2023-12-15T00:43:45.437Z","dependency_job_id":null,"html_url":"https://github.com/princemuel/invoicetracker-api","commit_stats":null,"previous_names":["princemuel/invoicetracker-api","princemuel/invoice-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/princemuel/invoicetracker-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princemuel%2Finvoicetracker-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princemuel%2Finvoicetracker-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princemuel%2Finvoicetracker-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princemuel%2Finvoicetracker-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/princemuel","download_url":"https://codeload.github.com/princemuel/invoicetracker-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princemuel%2Finvoicetracker-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31686136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["apollo-server","express","graphql","immer","nexus","nodejs","prisma","typescript"],"created_at":"2024-11-25T11:32:58.922Z","updated_at":"2026-04-11T15:34:24.919Z","avatar_url":"https://github.com/princemuel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Invoice Mail\n\nThis is the backend of my [Invoice Mail Web App](https://github.com/princemuel/invoice-web-app)\n\n## Table of contents\n\n- [Invoice Mail](#invoice-mail)\n  - [Table of contents](#table-of-contents)\n  - [Overview](#overview)\n  - [Available Scripts](#available-scripts)\n    - [`yarn dev`](#yarn-dev)\n    - [`yarn start`](#yarn-start)\n    - [`yarn studio`](#yarn-studio)\n    - [`yarn postinstall`](#yarn-postinstall)\n  - [Deployment](#deployment)\n  - [Links](#links)\n  - [My process](#my-process)\n    - [Built with](#built-with)\n    - [What I learned](#what-i-learned)\n    - [Continued development](#continued-development)\n    - [Useful resources](#useful-resources)\n  - [Author](#author)\n\n## Overview\n\nThis project was bootstrapped with [Express](https://expressjs.com/en/starter/installing.html) and [Apollo Server 4](https://www.apollographql.com/docs/apollo-server)\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `yarn dev`\n\nRuns the app in the development mode with server restarts.\u003cbr /\u003e\nOpen [http://localhost:4000](http://localhost:4000) to view it in the browser. You will be directed to the **Apollo Studio Playground**.\n\nThe page will refresh when you make edits to the code.\u003cbr /\u003e\nYou will also see updates to the GraphQL schema.\n\n### `yarn start`\n\nRuns the app in the development or production mode without server restarts.\u003cbr /\u003e\nOpen [http://localhost:4000](http://localhost:4000) to view it in the browser.\n\n\u003c!-- ### `yarn test`\n\nLaunches the test runner in the interactive watch mode.\u003cbr /\u003e\nSee the section about [running tests](https://) for more information. --\u003e\n\n### `yarn studio`\n\nOpens up Prisma Studio in the browser with a nice GUI interface. \u003cbr\u003e\nIt gives the developer a seamless and interactive experience with Prisma and the Database service used\n\n### `yarn postinstall`\n\nRuns automatically after the project's dependencies have been installed.\u003cbr /\u003e\nIt runs the generate script to output correct types, migrations, schema for Prisma and Nexus GraphQl\n\n## Deployment\n\nYour app is ready to be deployed!\nSee the section about [deployment](./docs/deployment.md) for more information.\n\n## Links\n\n- Code: [Github Repo](https://github.com/princemuel/invoice-api)\n- Api Endpoint: [Invoice Mailer](https://invoicemailer.onrender.com)\n\n## My process\n\n### Built with\n\n- RSA asymmetric encryption\n- [TS Node](https://typestrong.org/ts-node/docs/)\n- [Express](https://expressjs.com/en/starter/installing.html) - A Fast, unopinionated, minimalist web framework for Node.js\n- [Graphql](https://graphql.org/learn/) - A server-side runtime for executing queries using a type system you define for your data\n- [Apollo Server 4](https://www.apollographql.com/docs/apollo-server) - An open-source, spec-compliant GraphQL server that's compatible with any GraphQL client, including Apollo Client\n- [GraphQL Nexus](https://nexusjs.org/docs/) - A robust, composable, and declarative, code-first schemas for GraphQL in TypeScript/JavaScript\n- [Prisma](https://www.prisma.io/docs/guides) - A Next-generation Node.js and TypeScript ORM\n- [MongoDB](https://www.mongodb.com/) - A NoSQL Database program\n- [Typescript](https://www.typescriptlang.org/docs/) - A strongly typed programming language that builds on JavaScript, giving you better tooling at any scale\n- [Immer](https://immerjs.github.io/immer/) - A javascript package which helps you interact with your data by simply modifying it while keeping all the benefits of immutable data\n\n### What I learned\n\n- The proper way to work with state removing the need for boilerplate code and protecting it from future accidental modifications\n\n```ts\n\n```\n\n- How to generate RSA crypto key pairs\n\n```ts\nfunction generateCryptoKeyPair(callback: () =\u003e void) {\n  crypto.generateKeyPair(\n    'rsa',\n    {\n      modulusLength: 4096,\n      publicKeyEncoding: {\n        type: 'pkcs1',\n        format: 'pem',\n      },\n      privateKeyEncoding: {\n        type: 'pkcs1',\n        format: 'pem',\n        // cipher: 'aes-256-cbc',\n        // passphrase: '@Blah,b1@H.B1@w#$',\n      },\n    },\n    (error, publicKey, privateKey) =\u003e {\n      if (error) console.log(error);\n      callback();\n    }\n  );\n}\n```\n\n- How to get a user's image using the email hash,\n\n```ts\nfunction gravatar(email = '', size = 200, defaults = 'retro') {\n  const BASE_URL = `https://gravatar.com/avatar`;\n\n  if (!email) return `${BASE_URL}/?s=${size}\u0026d=${defaults}`;\n\n  const hash = createHash(email.trim(), 'md5').toString();\n  return `${BASE_URL}/${hash}?s=${size}\u0026d=${defaults}`;\n}\n\nfunction createHash(\n  data: crypto.BinaryLike,\n  algorithm: string,\n  encoding: crypto.BinaryToTextEncoding = 'hex',\n  options?: crypto.HashOptions\n) {\n  return crypto.createHash(algorithm, options).update(data).digest(encoding);\n}\n```\n\n### Continued development\n\n- Implementing refresh token rotation and reuse detection\n\n### Useful resources\n\n- [Javascript:The Definitive Guide](https://www.oreilly.com/library/view/javascript-the-definitive/9781491952016/) - This book by author David Flanagan helped me improve in my Javascript knowledge. I really liked this book and it will be my companion guide going forward cus' there are still some important concepts I have to master.\n\n\u003c!-- - [React TypeScript Tutorial: Polymorphic Components](https://youtu.be/uZ8GZm5KEXY?list=PLC3y8-rFHvwi1AXijGTKM0BKtHzVC-LSK) - This amazing video resource helped me finally understand how the reusable components in the existing componnt libraries are created. I'd recommend it to anyone who wants is not familiar with this concept. --\u003e\n\n- [Get a catch block error message with TypeScript](https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript) - This is an amazing article which helped me understand how to provide handle errors obtained in the catch block and make them type-safe. I'd recommend it to anyone still learning this concept.\n\n## Author\n\n- Website - [Prince Muel](https://princemuel.vercel.app) (In Development)\n- Twitter - [@iamprincemuel](https://www.twitter.com/iamprincemuel)\n- LinkedIn - [@princemuel](https://www.linkedin.com/in/princemuel)\n- Discord - [@princemuel](https://discordapp.com/users/princemuel#3896)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincemuel%2Finvoicetracker-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprincemuel%2Finvoicetracker-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincemuel%2Finvoicetracker-api/lists"}