diff --git a/LICENSE b/LICENSE index 23dbc4e..111c56c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Wilfredo Rujel +Copyright (c) 2022-present Wilfredo Rujel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 24b0312..0adfb50 100644 --- a/README.md +++ b/README.md @@ -2,34 +2,142 @@

Github History App

-
-
- - nestjs - - - nextjs - - - typecript - - - typecript - - - License - -
+ + Status + + + Version + + + License + + + Deployed on Vercel + + + Next.js version + + + NestJS version + + + Node.js version + + + Typescript version + + + Tailwindcss version + + + Jest version + + + React version + + + Github API version + + + Date-fns version + + + Swagger version + +
-This app will will show you a list of all commits of a github repository. You can search by username, select the repository and branch you want to search and it will show you a list of all commits respectively. - +This app will show you a list of all commits of a github repository. You can search by username, select the repository and branch you want to search and it will show you a list of all commits respectively. + +# Table of Contents +- [Table of Contents](#table-of-contents) +- [Features](#features) +- [Tech Stack](#tech-stack) +- [Getting Started](#getting-started) + - [Cloning the repository](#cloning-the-repository) + - [Setup Backend](#setup-backend) + - [Installation](#installation) + - [Running server](#running-server) + - [Documentation](#documentation) + - [Test](#test) + - [Setup Frontend](#setup-frontend) + - [Installation](#installation-1) + - [Running client](#running-client) +- [Try Demo](#try-demo) + +# Features +- [x] Show a list of all repositories of a Github user. +- [x] Show a list of all branches of a Github repository. +- [x] Show a list of all commits of a Github repository. +- [x] Use Github API to get data of commits, repositories, branches, etc. +- [x] Backend was developed with NestJS to create a REST API. +- [x] REST API was documented with Swagger. +- [x] Frontend was developed with NextJS and consume data from backend. +- [x] Frontend use Tailwind, a custom css loader and a dark theme. +- [x] Build and deploy with Vercel. +- [x] Typescript was used in backend and frontend. + +# Tech Stack +- [NestJS](https://nestjs.com/) +- [NextJS](https://nextjs.org/) +- [NodeJS](https://nodejs.org/) +- [Typescript](https://www.typescriptlang.org/) +- [Swagger](https://swagger.io/) +- [Jest](https://jestjs.io/) +- [React](https://reactjs.org/) +- [Tailwindcss](https://tailwindcss.com/) +- [Vercel](https://vercel.com/) +- [Github API](https://docs.github.com/en/rest) +- [Date-fns](https://date-fns.org/) + # Getting Started +This is a mono repository project that is divided in two parts, the backend and the frontend. The backend is developed with [NestJS](https://nestjs.com/) and the frontend with [NextJS](https://nextjs.org/). ## Cloning the repository -### On Windows Open a command prompt, and copy the following command, you need to have installed [git](https://git-scm.com/). ``` git clone https://github.com/wrujel/github-history.git @@ -44,7 +152,8 @@ remote: Total 138 (delta 54), reused 130 (delta 50), pack-reused 0 eceiving obje Receiving objects: 100% (138/138), 230.03 KiB | 747.00 KiB/s, done. Resolving deltas: 100% (54/54), done. ``` -## Setup server + +## Setup Backend Type the following command: ``` cd github-history/backend @@ -53,27 +162,17 @@ cd github-history/backend ### Installation Install all dependencies, you need to have installed [nodejs](https://nodejs.org/) version 16.15.0. ```bash -$ npm install +npm install ``` -We need now to get a personal token from your github account. - -1) Go to settings in your github account. -2) Go to developer settings and personal access token. -3) Click on `Generate new token`. -4) Type a note and click on `public repo`. -5) Click on Generate token. -6) Then copy token generated that start with `ghp_`. -7) Create a new file name `.env` in folder `github-history/backend/` -8) Paste token in file `.env`, after variable `API_TOKEN=`. ### Running server Commands to run backend server, use `start:dev` if you want to automatically reset server after saving changes. ```bash # development -$ npm run start +npm run start # watch mode -$ npm run start:dev +npm run start:dev ``` The server will start running. @@ -85,31 +184,35 @@ Open your browser and copy following url to see result: ``` http://localhost:8080/ ``` + ### Documentation You can visit following path to see documentation generated with swagger: ``` http://localhost:8080/api/docs ``` + ### Test Commands to test server. ```bash # unit tests -$ npm run test +npm run test # e2e tests -$ npm run test:e2e +npm run test:e2e ``` -## Setup client +## Setup Frontend In the root of project, type the following command: ``` cd github-history/frontend ``` + ### Installation Install all dependencies, you need to have installed [nodejs](https://nodejs.org/) version 16.15.0. ```bash -$ npm install +npm install ``` + ### Running client Run the development server: @@ -122,9 +225,4 @@ yarn dev Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. # Try Demo - -The project is deployed with Vercel. - -Open this link with your browser to see demo. - -https://github-history.vercel.app/ +The project is deployed with Vercel. Open this link with your browser to see demo. https://github-history.vercel.app/