{"id":26828364,"url":"https://github.com/tfd-ed/tfd-nest-blog-api","last_synced_at":"2025-06-12T10:09:50.890Z","repository":{"id":58073079,"uuid":"529851215","full_name":"tfd-ed/tfd-nest-blog-api","owner":"tfd-ed","description":"API for TFD E-Learning","archived":false,"fork":false,"pushed_at":"2024-09-22T08:37:58.000Z","size":708,"stargazers_count":5,"open_issues_count":8,"forks_count":7,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-30T04:34:04.964Z","etag":null,"topics":["docker","e-learning","nestjs","postgresql","rest-api","typeorm","typescript"],"latest_commit_sha":null,"homepage":"https://tfdevs.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tfd-ed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2022-08-28T12:08:42.000Z","updated_at":"2024-09-22T08:38:02.000Z","dependencies_parsed_at":"2025-03-30T12:41:07.299Z","dependency_job_id":null,"html_url":"https://github.com/tfd-ed/tfd-nest-blog-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tfd-ed/tfd-nest-blog-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfd-ed%2Ftfd-nest-blog-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfd-ed%2Ftfd-nest-blog-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfd-ed%2Ftfd-nest-blog-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfd-ed%2Ftfd-nest-blog-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tfd-ed","download_url":"https://codeload.github.com/tfd-ed/tfd-nest-blog-api/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfd-ed%2Ftfd-nest-blog-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259444968,"owners_count":22858549,"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":["docker","e-learning","nestjs","postgresql","rest-api","typeorm","typescript"],"created_at":"2025-03-30T12:30:29.535Z","updated_at":"2025-06-12T10:09:50.871Z","avatar_url":"https://github.com/tfd-ed.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eTFD E-Learning API \u003c/h1\u003e  \n\u003cp align=\"center\"\u003e  \n\u003cimg src=\"https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge\u0026logo=docker\u0026logoColor=white\" width=\"75\"\u003e  \n\u003cimg src=\"https://img.shields.io/badge/node.js-%2343853D.svg?style=for-the-badge\u0026logo=node.js\u0026logoColor=white\" width=\"80\"\u003e  \n\u003cimg src=\"https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white\" width=\"100\"\u003e  \n\u003cimg src=\"https://img.shields.io/badge/nginx-%23009639.svg?style=for-the-badge\u0026logo=nginx\u0026logoColor=white\" width=\"70\"\u003e  \n\u003cimg src=\"https://img.shields.io/badge/nestjs-%23E0234E.svg?style=for-the-badge\u0026logo=nestjs\u0026logoColor=white\" width=\"73\"\u003e  \n\u003cimg src=\"https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge\u0026logo=postgresql\u0026logoColor=white\" width=\"90\"\u003e  \n\u003cimg src=\"https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge\u0026logo=redis\u0026logoColor=white\" width=\"70\"\u003e  \n\u003cimg src=\"https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge\u0026logo=jest\u0026logoColor=white\" width=\"60\"\u003e  \n\u003cbr/\u003e  \n\u003ca href=\"https://www.npmjs.com/~nestjscore\" target=\"_blank\"\u003e\u003cimg src=\"https://badge.fury.io/js/%40nestjs%2Fcore.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e  \n\u003ca href=\"https://www.gnu.org/licenses/gpl-3.0\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-GPLv3-blue.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e  \n\u003cimg alt=\"YouTube Channel Subscribers\" src=\"https://img.shields.io/youtube/channel/subscribers/UCJHZ__wUxS9lgTZHMxpMJcQ?style=social\"\u003e  \n\u003c/p\u003e  \n\n## Features\n\nThis is a NestJS boilerplate code with preconfigured libraries and packages with the following features:\n- One-click setup with [Docker](https://www.docker.com/)\n- [Typeorm](https://typeorm.io/) for Object–relational mapping, use **Postgres DB** by default\n- Sample data generation with typeorm-fixture (generate fixture based on .yaml file), visit [RobinCK/typeorm-fixtures](https://github.com/RobinCK/typeorm-fixtures).\n- Preconfigured Caching Mechanism ([Redis Store](https://redis.io/))\n- [Swagger UI](https://swagger.io/) (Express)\n- Authentication with JWT\n- Basic RBAC implementation ( You'll have to attach user object to your request manually )\n\n## TFD E-Learning\n- TFD Blog (Now TFD E-Learning) : https://github.com/tfd-ed/tfd-blog\n- TFD E-Learning Admin: https://github.com/tfd-ed/tfd-elearning-admin\n- TFD E-Learning API: https://github.com/tfd-ed/tfd-nest-blog-api\n\n## Setup Guide\n**Be aware that** putting **DB_SYNC** to true in your production may result in irreversible data lost.  \n**DB_SYNC** should only be put to true in development to skip the necessity of doing migrations.\n### Without Docker\n\n- Create .env file with command `cp .env.example .env` and replace with your own env variable\n- `yarn install`\n- `yarn start` (Your API will be exposed through port 3000)\n\n### With Docker\nRun the following scripts for UNIX (Mac,Linux)\n```bash  \n$ cp .env.example .env\n$ docker-compose up -d\n```  \nDOS(Windows)\n```bash  \n$ copy .env.example .env\n$ docker-compose up -d\n```  \n\n## Available Services with Docker Container\nOnce you managed to run the docker container, the following service will be available:\n- Nginx will serve as a reverse proxy and will be exposed through port 80 (http://localhost)\n- Swagger API Docs (http://localhost/docs/)\n- Database (Postgres 12) (http://localhost:5432)\n- Redis Commander (http://localhost:8081)\n- Redis Store (Only Available in internal docker network) (http://0.0.0.0:6379)\n- NestJs Server (Only Available in internal docker network) (http://0.0.0.0:3000)\n## Migration Guide\nNew migration with typeorm-cli:\n```bash  \n$ docker exec -it tfd-api-server yarn migration:create -n {CreateTable}\n```  \nMigration file will be inside `src/migrations`.  \nNote that you will have to write migration code inside up and down method on your own.  \nTo generate migration for new database or from the changes in database schema(entities) use:\n```bash  \n$ docker exec -it tfd-api-server yarn migration:generate -n {GenerateTable}\n```  \n#### Run Migrations  \n```bash  \n$ docker exec -it tfd-api-server yarn migration:run\n```  \n#### Revert Migrations\n```bash  \n$ docker exec -it tfd-api-server yarn migration:revert\n```  \n\n## Generate Fixture\nFixture lets you play around with sample data. It's not recommended generating in production since it may erase real data.  visit [RobinCK/typeorm-fixtures](https://github.com/RobinCK/typeorm-fixtures) for more info.\n#### Generate Sample Data Make sure the docker container is running\n```bash  \n$ docker exec -it tfd-api-server yarn fixture:generate\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfd-ed%2Ftfd-nest-blog-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftfd-ed%2Ftfd-nest-blog-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfd-ed%2Ftfd-nest-blog-api/lists"}