{"id":23739915,"url":"https://github.com/jharrilim/stackathon","last_synced_at":"2026-04-14T14:32:49.331Z","repository":{"id":44592402,"uuid":"183963937","full_name":"jharrilim/stackathon","owner":"jharrilim","description":"Fully integrated full stack project in a week","archived":false,"fork":false,"pushed_at":"2019-05-05T02:42:12.000Z","size":629,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-10T12:23:19.030Z","etag":null,"topics":["docker-compose","newman","pgadmin","postgres","react","react-context","react-hooks","typescript"],"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/jharrilim.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}},"created_at":"2019-04-28T22:09:30.000Z","updated_at":"2022-07-11T18:55:01.000Z","dependencies_parsed_at":"2022-08-31T20:02:03.050Z","dependency_job_id":null,"html_url":"https://github.com/jharrilim/stackathon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jharrilim/stackathon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jharrilim%2Fstackathon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jharrilim%2Fstackathon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jharrilim%2Fstackathon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jharrilim%2Fstackathon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jharrilim","download_url":"https://codeload.github.com/jharrilim/stackathon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jharrilim%2Fstackathon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31801366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"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":["docker-compose","newman","pgadmin","postgres","react","react-context","react-hooks","typescript"],"created_at":"2024-12-31T09:40:00.635Z","updated_at":"2026-04-14T14:32:49.306Z","avatar_url":"https://github.com/jharrilim.png","language":"TypeScript","readme":"# Stackathon\n\n## Preface\n\nThis repository acts as an example of how to deliver modern best practices in node full-stack. This example will show you:\n\n- Docker Compose\n  - In production\n    - Acting as VPC with only 1 entry point\n  - In development\n    - Ports exposed; easy to access\n    - PGAdmin available\n  - In test\n    - Running Postman test collections against your API\n- Nginx Configuration\n  - Reverse Proxy to API\n  - CORS Enabled\n- Modern React\n  - Functional Components\n  - React Context as an IoC container\n  - React Hooks for simplified and localized state updates\n- Typescript\n  - Using Interfaces for [compile-time PropTypes](https://github.com/Microsoft/TypeScript-React-Starter#creating-a-component) instead of [runtime PropTypes](https://reactjs.org/docs/typechecking-with-proptypes.html)\n  - Get type hints for Context and Hooks\n  - Annotations for the most common controller pattern used in: ASP.NET, Spring Boot, Flask, etc.\n  - Better IDE Support\n- Password Hashing and Salting\n- Node.js Cluster\n  - Running a process for each core available on the host CPU\n  - Round robin load balancing\n  - Restart child process on failure\n\n## Table of Contents\n\n- [Stackathon](#stackathon)\n  - [Preface](#preface)\n  - [Table of Contents](#table-of-contents)\n  - [Running In Circles](#running-in-circles)\n    - [Everything; Dev Mode](#everything-dev-mode)\n    - [Everything; Prod Mode](#everything-prod-mode)\n    - [Debugging the Client](#debugging-the-client)\n    - [Debugging the API](#debugging-the-api)\n  - [Testing](#testing)\n    - [Running the Postman API Tests](#running-the-postman-api-tests)\n    - [Running the Unit Tests for the API and the Client](#running-the-unit-tests-for-the-api-and-the-client)\n    - [Code Structure](#code-structure)\n      - [API](#api)\n      - [Client](#client)\n    - [Test Structure](#test-structure)\n      - [Mocks](#mocks)\n      - [Naming Convention](#naming-convention)\n  - [Features](#features)\n\n## Running In Circles\n\n### Everything; Dev Mode\n\nRun it all!\n\n```sh\ndocker-compose up --build -d --force-recreate\n```\n\n### Everything; Prod Mode\n\nRun it all using the docker-compose.production.yml.\n\n\u003e Note: You will need to specify the environment variables through a .env or by\n\u003e setting it on your environment.\n\n```sh\ndocker-compose -f docker-compose.production.yml up --build -d\n```\n\n\u003e Notier Note: You may also wish to use `kompose convert` and use `kubectl` instead if you are deploying to a Kubernetes provider.\n\n### Debugging the Client\n\nRun everything except the client in Docker Compose:\n\n```sh\ndocker-compose up -d db api pgadmin\n```\n\nAfter changes are made:\n\n```sh\ndocker-compose up --build client\n```\n\nYou may also run the API with `npm start` instead, and only run the DB in compose.\nThis way you can use `npm start` on the Client and take advantage of hot reloading as well.\n\n### Debugging the API\n\nRun the DB in compose:\n\n```sh\ndocker-compose up -d db pgadmin\n```\n\nYou may perform similar steps as above to run the API.\n\n## Testing\n\nThe API and the Client both use `jest` for testing. The API also uses Postman for blackbox testing. \nYou may find more information about **Postman** [here](https://www.getpostman.com/resources/videos-tutorials/) \nand its CLI tool **Newman** [here](https://github.com/postmanlabs/newman#using-newman-cli).\n\n### Running the Postman API Tests\n\n\u003e Note: Make sure test.sh is executable: `chmod 744 ./api/scripts/test.sh`\n\n```sh\n./api/scripts/test.sh\n```\n\n### Running the Unit Tests for the API and the Client\n\n```sh\nnpm t\n```\n\n### Code Structure\n\n#### API\n\nThe API code is sorted by feature as opposed to structural formatting. Since the routes \ndon't have any overlap, this keeps everything in nice tidy areas.\nThis is similar to [ASP.NET Areas](https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/areas?view=aspnetcore-2.2).\n\n#### Client\n\nThe Client code is structured in a more familiar structural layout.\nIt is kept this way as the components directory tends to grow large, and keeping the services\ntogether makes it easier to find when adding it to the AppContext for dependency injection.\n\n### Test Structure\n\n#### Mocks\n\nJest mocks that are placed in `src/__mocks__/` will replace node_module packages of the same name. Eg:\nthe `./client/__mocks__/axios.ts` mock replaces the Axios module when running jest.\n\n\u003e Documentation for this can be found [here](https://jestjs.io/docs/en/manual-mocks).\n\n#### Naming Convention\n\nJest will look for any file inside of a `__tests__` folder, of any file that ends in:\n\n- .test.ts\n- .test.tsx\n- .spec.ts\n- .spec.tsx\n\n## Features\n\n- [API Features](./api/README.md)\n- [Client Features](./client/README.md)\n- Docker Compose contains all services + pgadmin (attach to db through container network using db as hostname)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjharrilim%2Fstackathon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjharrilim%2Fstackathon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjharrilim%2Fstackathon/lists"}