Skip to content

Commit

Permalink
chore: improve README, format files and add CI for formatting (#49)
Browse files Browse the repository at this point in the history
* chore: improve README, format files and add CI for formatting

* chore: fix ci
  • Loading branch information
neumanf authored Mar 3, 2024
1 parent 6dae46a commit 4c042f0
Show file tree
Hide file tree
Showing 45 changed files with 27,561 additions and 32,660 deletions.
80 changes: 40 additions & 40 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apps/ui/src/themes/* linguist-vendored
19 changes: 19 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CD

on:
push:
branches: ['main']

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./apps/api
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CI

on:
push:

jobs:
format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm install --only=dev
- run: npm run format
19 changes: 0 additions & 19 deletions .github/workflows/deploy.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"singleQuote": true,
"tabWidth": 4,
"editor.formatOnSave": true,
"printWidth": 80
"singleQuote": true,
"tabWidth": 4,
"printWidth": 80
}
43 changes: 35 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--suppress HtmlDeprecatedAttribute -->
<p align="center">
<a href="">
<img src="./frontend/public/logo.svg" height="220">
<img src="./apps/ui/src/assets/logo.svg" height="220">
</a>
</p>

Expand All @@ -14,16 +14,43 @@ A collection of open source web services

## Features

- URL Shortener and Pastebin services
- Authentication with JWT
- User dashboard
- CI/CD
- Tests
- URL Shortener and Pastebin services
- CI/CD
- Tests

## Stack

- **Frontend:** React, Next.js and Mantine
- **Backend:** Nest.js, Prisma and PostgreSQL
- **Frontend:** Angular and PrimeNG.
- **Backend:** Springboot, RabbitMQ, PostgreSQL and Redis.

## Architecture

```mermaid
---
title: Mally Architecture
---
flowchart LR
%% Styles
classDef app fill:#f7e081,stroke:#333,stroke-width:1px
%% Entities
UI[UI - Angular]
POSTGRES[(PostgreSQL)]
API[API - Springboot]
RMQ[RabbitMQ]
REDIS[(Redis)]
%% Flow
UI -->|HTTP|BACKEND
RMQ <-->|AMQP|BACKEND
subgraph BACKEND [API]
direction LR
API --> POSTGRES
API --> REDIS
end
```

## License

Expand Down
140 changes: 62 additions & 78 deletions apps/api/project.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,65 @@
{
"name": "api",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/api/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nxrocks/nx-spring-boot:build",
"options": {
"root": "apps/api"
},
"dependsOn": [
"^install"
],
"outputs": [
"{workspaceRoot}/apps/api/build"
]
"name": "api",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/api/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nxrocks/nx-spring-boot:build",
"options": {
"root": "apps/api"
},
"dependsOn": ["^install"],
"outputs": ["{workspaceRoot}/apps/api/build"]
},
"install": {
"executor": "@nxrocks/nx-spring-boot:install",
"options": {
"root": "apps/api"
},
"dependsOn": ["^install"],
"outputs": ["{workspaceRoot}/apps/api/build"]
},
"test": {
"executor": "@nxrocks/nx-spring-boot:test",
"options": {
"root": "apps/api"
},
"outputs": ["{workspaceRoot}/apps/api/build"]
},
"clean": {
"executor": "@nxrocks/nx-spring-boot:clean",
"options": {
"root": "apps/api"
}
},
"run": {
"executor": "@nxrocks/nx-spring-boot:run",
"options": {
"root": "apps/api"
},
"dependsOn": ["^install"]
},
"serve": {
"executor": "@nxrocks/nx-spring-boot:serve",
"options": {
"root": "apps/api"
},
"dependsOn": ["^install"]
},
"build-image": {
"executor": "@nxrocks/nx-spring-boot:build-image",
"options": {
"root": "apps/api"
},
"outputs": ["{workspaceRoot}/apps/api/build"]
},
"build-info": {
"executor": "@nxrocks/nx-spring-boot:build-info",
"options": {
"root": "apps/api"
}
}
},
"install": {
"executor": "@nxrocks/nx-spring-boot:install",
"options": {
"root": "apps/api"
},
"dependsOn": [
"^install"
],
"outputs": [
"{workspaceRoot}/apps/api/build"
]
},
"test": {
"executor": "@nxrocks/nx-spring-boot:test",
"options": {
"root": "apps/api"
},
"outputs": [
"{workspaceRoot}/apps/api/build"
]
},
"clean": {
"executor": "@nxrocks/nx-spring-boot:clean",
"options": {
"root": "apps/api"
}
},
"run": {
"executor": "@nxrocks/nx-spring-boot:run",
"options": {
"root": "apps/api"
},
"dependsOn": [
"^install"
]
},
"serve": {
"executor": "@nxrocks/nx-spring-boot:serve",
"options": {
"root": "apps/api"
},
"dependsOn": [
"^install"
]
},
"build-image": {
"executor": "@nxrocks/nx-spring-boot:build-image",
"options": {
"root": "apps/api"
},
"outputs": [
"{workspaceRoot}/apps/api/build"
]
},
"build-info": {
"executor": "@nxrocks/nx-spring-boot:build-info",
"options": {
"root": "apps/api"
}
}
},
"tags": []
"tags": []
}
Loading

0 comments on commit 4c042f0

Please sign in to comment.