Hey everyone ๐
I've decided to start sharing weekly updates about what Iโm building,
learning, and overcoming as a software developer.
๐ช๐ต๐?
To track and share what Iโm learning, stay consistent with my personal projects, and connect with others in the tech community.
๐ This first post covers the past couple of weeks as Iโve kicked off a new project:
๐ก ๐ง๐ต๐ฒ ๐ฃ๐ฟ๐ผ๐ท๐ฒ๐ฐ๐ - ๐๐ฒ๐๐ ๐ฆ๐๐ (https://github.com/JackEcuyer/hevy-sdk/)
I'm building a TypeScript SDK for the Hevy API, to be compatible with Node.js, JavaScript frameworks, and browsers. I chose to build this because of my love for the Hevy app, which I use to track all of my workouts (https://www.hevyapp.com/). I hope to expand the Hevy API ecosystem while improving my TypeScript skills.
โ
๐๐ถ๐ด๐ต๐น๐ถ๐ด๐ต๐๐ ๐ฆ๐ผ ๐๐ฎ๐ฟ
โข Set up GitHub repository and version control
โข Configured TypeScript to build npm package for CommonJS & ES Modules
โข Developed HevyClient class for SDK interaction
โข Implemented API routines to retrieve & create workout data
โข Integrated Zod for schema validation when posting workouts
โข Setup Jest for SDK testing
โข Improved error handling with user-friendly API & validation error formatting
โข Installed and configured ESLint for code consistency
โข Set up Husky for pre-commit testing & linting
๐ ๐ช๐ต๐ฎ๐ ๐โ๐๐ฒ ๐๐ฒ๐ฎ๐ฟ๐ป๐ฒ๐ฑ
โข How to configure TypeScript for both CommonJS and ES Modules
โข Best practices for creating reusable and modular SDK classes (e.g. HevyClient)
โข Integrating Zod for data validation and ensuring strong API request handling
โข Writing effective tests for SDK functionality using Jest
โข Handling and presenting API and validation errors in a user-friendly way
โข Configuring ESLint to maintain consistent code quality and style
โข Using Husky for automating pre-commit checks to ensure clean code
โข Using the Git CLI to fix incorrect commits to Github
โ ๏ธ ๐๐ต๐ฎ๐น๐น๐ฒ๐ป๐ด๐ฒ๐
โข ESLint v9 configuration was tricky, as the new format required importing plugin modules. However, using the TypeScript ESLint package made this easier.
โข I made a couple of incorrect git commits that were pushed to the remote Github repository, meaning I had to learn to correctly use the Git CLI to fix the commit history.
โข While testing with ts-node, I ran into ESM syntax errors, which helped me understand the differences between ESM and CommonJS in Node.js.
๐ ๐ก๐ฒ๐
๐ ๐ฆ๐๐ฒ๐ฝ๐
Next steps include improving test coverage by integrating mock fetch requests into Jest, adding prettier and JSDoc, and refining type checking.
If youโre into learning new technologies, building personal projects, or are passionate about software - follow along!
Iโll be posting an update every week, within reason. Some weeks, circumstances may mean I canโt make a progress post, but Iโll keep it as consistent as I can. Happy to connect ๐
Top comments (0)