-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from hamza-cskn/dev
Add admin panel
- Loading branch information
Showing
55 changed files
with
9,928 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
NGINX_VERSION=1.25 | ||
FRONTEND_SERVICE_VERSION=1.0 | ||
BLOG_SERVICE_VERSION=1.0 | ||
COMMENT_SERVICE_VERSION=1.0 | ||
AUTH_SERVICE_VERSION=1.0 | ||
MONGO_VERSION=latest | ||
PROMETHEUS_VERSION=v2.47.0 | ||
MONGODB_EXPORTER_VERSION=0.20 | ||
NGINX_EXPORTER_VERSION=0.11 | ||
GRAFANA_VERSION=9.4.14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<p align="center"> | ||
<img style="width: 200px" src="https://github.com/hamza-cskn/blog-services/blob/main/frontend/static/favicon.png"/> | ||
<img style="width: 200px" src="https://github.com/hamza-cskn/blog-services/blob/main/frontend/static/favicon.png" alt="logo of website"/> | ||
</p> | ||
|
||
## Blog Services | ||
|
@@ -22,20 +22,15 @@ Here is the tech stack used in this project: | |
12. [x] Add `docker compose build` support. | ||
13. [x] Postman collection for the API | ||
|
||
Note: The provided `docker-compose.yml` does not include MongoDB as scaled. | ||
![arch](https://github.com/hamza-cskn/blog-services/assets/36128276/a4e18198-f62a-44b7-99cf-f76bedf049dd) | ||
|
||
|
||
### Goals | ||
1. [ ] Add error tracking and logging. | ||
![architecture](https://github.com/hamza-cskn/blog-services/assets/36128276/4cea2caf-b1ac-4e31-9945-066241fe9ae5) | ||
|
||
### How to run | ||
1. Clone the repository: `git clone [email protected]:hamza-cskn/blog-services.git` | ||
2. Go the repository directory: `cd blog-services` | ||
3. Build the docker images: `docker compose build` | ||
4. Configure the `docker-compose.yml` and other configuration files as you want. | ||
5. Run the docker containers: `docker compose up -d` | ||
6. Visit `https://localhost` to see the front-end (nginx). | ||
6. Visit [`https://localhost`](https://localhost) to see the front-end. | ||
|
||
### How to test | ||
1. Just run `npm run test --prefix <service-name>`. Enjoy. | ||
|
@@ -54,3 +49,18 @@ Note: The provided `docker-compose.yml` does not include MongoDB as scaled. | |
The repository has ready-to-use Postman collection. Check `blog-app.postman_collection.json` file or visit the [documentation page](https://documenter.getpostman.com/view/24413595/2s9YC5zDD7). | ||
|
||
If you know Turkish, feel free to read my [Rest API](https://medium.com/software-development-turkey/rest-api-nedir-standartları-nelerdir-ca1c7d7d0502) blog. | ||
|
||
## Screenshots | ||
<details> | ||
<summary>Click to expand</summary> | ||
<img width="1362" alt="image" src="https://github.com/hamza-cskn/blog-services/assets/36128276/da9d3dc3-95c4-48d2-a64b-37b8b3e01ef8"> | ||
<img width="1352" alt="image" src="https://github.com/hamza-cskn/blog-services/assets/36128276/36b7bcce-c87e-46f7-b767-ea5758b0d571"> | ||
<img width="1355" alt="image" src="https://github.com/hamza-cskn/blog-services/assets/36128276/a08aa9eb-53ec-4411-be72-b7bfe1633740"> | ||
<img width="1349" alt="image" src="https://github.com/hamza-cskn/blog-services/assets/36128276/dd1f5929-da5f-483d-b3ee-fe8668450267"> | ||
<img width="1357" alt="image" src="https://github.com/hamza-cskn/blog-services/assets/36128276/a991dc20-ad24-44ac-a1f9-9a7b4a5ea08c"> | ||
<img width="1359" alt="image" src="https://github.com/hamza-cskn/blog-services/assets/36128276/72498d25-8edb-4801-bcbc-59fcbdd0c972"> | ||
<img width="1370" alt="image" src="https://github.com/hamza-cskn/blog-services/assets/36128276/8a045675-5ddc-4f16-8e19-d47095dde05d"> | ||
<img width="1369" alt="image" src="https://github.com/hamza-cskn/blog-services/assets/36128276/b3296b4f-c21f-4141-8829-675095955864"> | ||
<img width="1357" alt="image" src="https://github.com/hamza-cskn/blog-services/assets/36128276/9b2c72de-256b-4dda-88e2-e4387ef15832"> | ||
</details> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:alpine As build | ||
|
||
WORKDIR /usr/app | ||
COPY . . | ||
RUN npm install && npm run build | ||
|
||
FROM node:alpine as production | ||
|
||
WORKDIR /usr/app | ||
COPY package*.json . | ||
RUN npm install --only=production | ||
COPY --from=build /usr/app/dist ./dist | ||
CMD ["node", "dist/main"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<p align="center"> | ||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a> | ||
</p> | ||
|
||
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 | ||
[circleci-url]: https://circleci.com/gh/nestjs/nest | ||
|
||
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p> | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a> | ||
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a> | ||
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a> | ||
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a> | ||
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a> | ||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a> | ||
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a> | ||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a> | ||
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a> | ||
</p> | ||
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer) | ||
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)--> | ||
|
||
## Description | ||
|
||
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. | ||
|
||
## Installation | ||
|
||
```bash | ||
$ npm install | ||
``` | ||
|
||
## Running the app | ||
|
||
```bash | ||
# development | ||
$ npm run start | ||
|
||
# watch mode | ||
$ npm run start:dev | ||
|
||
# production mode | ||
$ npm run start:prod | ||
``` | ||
|
||
## Test | ||
|
||
```bash | ||
# unit tests | ||
$ npm run test | ||
|
||
# e2e tests | ||
$ npm run test:e2e | ||
|
||
# test coverage | ||
$ npm run test:cov | ||
``` | ||
|
||
## Support | ||
|
||
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). | ||
|
||
## Stay in touch | ||
|
||
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) | ||
- Website - [https://nestjs.com](https://nestjs.com/) | ||
- Twitter - [@nestframework](https://twitter.com/nestframework) | ||
|
||
## License | ||
|
||
Nest is [MIT licensed](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/nest-cli", | ||
"collection": "@nestjs/schematics", | ||
"sourceRoot": "src", | ||
"compilerOptions": { | ||
"deleteOutDir": true | ||
} | ||
} |
Oops, something went wrong.