Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# BackEnd
HOST=localhost
PORT=3005

Empty file removed .eslintrc.js
Empty file.
128 changes: 32 additions & 96 deletions .github/workflows/CI-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,116 +1,52 @@
name: CI workflow

on:
pull_request:
branches: ['dev', 'main']
paths-ignore:
- '*.md'
- 'docs/**'
pull_request:
branches: ['dev', 'main']
paths-ignore:
- '*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
frontend:
runs-on: ubuntu-latest
CI:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install deps
run: pnpm install --frozen-lockfile
- name: Install deps
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm lint:frontend
- name: Lint
run: pnpm lint

- name: Lint FSD
run: pnpm lint:fsd:frontend
- name: Lint FSD
run: pnpm lint:fsd

- name: Format
run: pnpm format:check:frontend
- name: Format
run: pnpm format:check

- name: Typecheck
run: pnpm typecheck:frontend
- name: Typecheck
run: pnpm typecheck

- name: Unit tests
run: pnpm test:frontend:ci
- name: Unit tests
run: pnpm test:ci

- name: Build
run: pnpm build:frontend
- name: Build
run: pnpm build

# - name: Build Storybook
# run: pnpm build-storybook

backend:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:16
env:
POSTGRES_DB: test
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready"
--health-interval=10s
--health-timeout=5s
--health-retries=5

env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
PORT: 3000
JWT_SECRET: test
JWT_EXPIRES_IN: 7d
NODE_ENV: test
CORS_ALLOWED_ORIGINS: http://localhost:3000

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install deps
run: pnpm install --frozen-lockfile

- name: Prisma generate
run: pnpm prisma:generate:backend

- name: Apply migrations (test DB)
run: pnpm prisma:migrate:deploy:backend

- name: Lint
run: pnpm lint:backend

- name: Format
run: pnpm format:check:backend

- name: Typecheck
run: pnpm typecheck:backend

- name: Unit tests
run: pnpm test:backend:ci

- name: Build
run: pnpm build:backend
# - name: Build Storybook
# run: pnpm build-storybook
5 changes: 2 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pnpm exec lint-staged
pnpm lint:fsd:frontend
pnpm typecheck:backend
pnpm typecheck:frontend
pnpm lint:fsd
pnpm typecheck
3 changes: 2 additions & 1 deletion .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {

Check warning on line 1 in .lintstagedrc.mjs

View workflow job for this annotation

GitHub Actions / CI

Assign object to a variable before exporting as module default
'*.{ts,js,mjs}': ['eslint --fix --no-warn-ignored', 'prettier --write'],
'*.{ts,tsx,js,jsx,mjs}': ['eslint --fix --no-warn-ignored', 'prettier --write'],
'*.{json,css,md}': ['prettier --write'],
'*.{ts,tsx}': ['vitest related --run'],
};
5 changes: 2 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
node_modules
dist
build
.next
coverage
pnpm-lock.yaml
*.tsbuildinfo
*.tsbuildinfo
*.log
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"endOfLine": "auto"
"endOfLine": "auto",
"plugins": ["prettier-plugin-tailwindcss"]
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Preview } from '@storybook/nextjs-vite';
import '../src/app/styles/global.css';
import 'app/styles/global.css';

const preview: Preview = {
parameters: {
Expand Down
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
# Task Tracker
# Task Tracker (frontend)

## Структура проекта

- `apps/frontend` - Next.js приложение
- `apps/backend` - NestJS API
- `packages/config` - Общие конфиги
- `packages/shared-types` - Общие типы TypeScript
- `docs` - Общая документация
Next.js-приложение.

## Быстрый старт

```bash
pnpm install
# Запустить Postgres
docker-compose up -d

pnpm dev # Запускает и frontend, и backend

pnpm dev
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions apps/backend/.env.example

This file was deleted.

6 changes: 0 additions & 6 deletions apps/backend/.env.test

This file was deleted.

5 changes: 0 additions & 5 deletions apps/backend/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions apps/backend/.lintstagedrc.mjs

This file was deleted.

6 changes: 0 additions & 6 deletions apps/backend/eslint.config.mjs

This file was deleted.

14 changes: 0 additions & 14 deletions apps/backend/jest.config.ts

This file was deleted.

5 changes: 0 additions & 5 deletions apps/backend/jest.setup.ts

This file was deleted.

18 changes: 0 additions & 18 deletions apps/backend/nest-cli.json

This file was deleted.

82 changes: 0 additions & 82 deletions apps/backend/package.json

This file was deleted.

Loading
Loading