Skip to content

Commit 1c9c894

Browse files
committed
migrate to nashtech-garage org
0 parents  commit 1c9c894

File tree

212 files changed

+32792
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+32792
-0
lines changed

.github/workflows/backend-ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Backend Development Pipeline
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'backend/**'
8+
pull_request:
9+
branches: [ dev ]
10+
paths:
11+
- 'backend/**'
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: backend
19+
20+
steps:
21+
# 1. Checkout code
22+
- name: Checkout source code
23+
uses: actions/checkout@v4
24+
25+
# 2. Setup Java (JVM)
26+
- name: Setup Java 18
27+
uses: actions/setup-java@v4
28+
with:
29+
distribution: temurin
30+
java-version: 18
31+
32+
# 3. Setup Scala + sbt
33+
- name: Setup Scala & sbt
34+
uses: coursier/setup-action@v1
35+
with:
36+
apps: sbt
37+
38+
# 4. Build (compile & stage)
39+
- name: Build Play Framework App
40+
run: sbt stage
41+
42+
# 5. Run Scalastyle (Static Code Analysis)
43+
- name: Run Scalastyle
44+
run: sbt scalastyle
45+
46+
# 6. Run tests with coverage
47+
- name: Run Scoverage Tests
48+
run: sbt clean coverage test coverageReport coverageAggregate

.github/workflows/frontend-ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Frontend Development Pipeline
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'frontend/**'
8+
pull_request:
9+
branches: [ dev ]
10+
paths:
11+
- 'frontend/**'
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: frontend
19+
20+
steps:
21+
# 1. Checkout & Setup
22+
- name: Checkout source code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
cache: 'npm'
30+
cache-dependency-path: frontend/package-lock.json
31+
32+
# 2. Install dependencies
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
# 3. Code Quality Checks (Lint, Prettier, Type-check)
37+
- name: Run Code Quality Checks
38+
run: |
39+
npm run lint || true
40+
npm run format:check || true
41+
npx tsc --noEmit || true
42+
43+
# 4. Run Tests
44+
- name: Run Unit Tests & Coverage
45+
run: |
46+
npm run test:run
47+
npm run test:coverage
48+
49+
# 5. Build & Deploy
50+
- name: Build & Deploy
51+
run: |
52+
npm run build
53+
npx vercel --prod --yes --token=${{ secrets.TRELLO_FRONTEND_VERCEL_TOKEN }}
54+
env:
55+
VERCEL_ORG_ID: ${{ vars.TRELLO_FRONTEND_VERCEL_ORG_ID }}
56+
VERCEL_PROJECT_ID: ${{ vars.TRELLO_FRONTEND_VERCEL_PROJECT_ID }}
57+
VITE_TRELLO_LIKE_API_URL: ${{ vars.VITE_TRELLO_LIKE_API_URL }}

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Smart Taskhub
2+
3+
**Smart Taskhub** is a project management application that helps teams organize tasks, manage workflows, and collaborate effectively.
4+
5+
## 🚀 Tech Stack
6+
- **Frontend**: React + TypeScript
7+
- **Backend**: Play Framework (Scala)
8+
- **Database**: PostgreSQL
9+
10+
## 📂 Project Structure
11+
- `frontend/` – Frontend source code (UI).
12+
- `backend/` – Backend API server.
13+
14+
## ⚡ How to Run
15+
Each part has its own detailed setup guide:
16+
- [Frontend README](./frontend/README.md)
17+
- [Backend README](./backend/README.md)

backend/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
logs
2+
target
3+
/.bsp
4+
/.idea
5+
/.idea_modules
6+
/.classpath
7+
/.project
8+
/.settings
9+
/RUNNING_PID
10+
**/target/
11+
.env

backend/Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Base image with Java 21
2+
FROM openjdk:21-jdk-slim
3+
4+
# Install necessary tools: curl, unzip
5+
RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/*
6+
7+
# Set working directory
8+
WORKDIR /app
9+
10+
# Copy source code
11+
COPY . .
12+
13+
# Install sbt (Scala Build Tool)
14+
RUN curl -L -o sbt.zip https://github.com/sbt/sbt/releases/download/v1.9.9/sbt-1.9.9.zip && \
15+
unzip sbt.zip && \
16+
mv sbt*/ /usr/local/sbt && \
17+
ln -s /usr/local/sbt/bin/sbt /usr/local/bin/sbt && \
18+
rm sbt.zip
19+
20+
# Stage app (compile + prepare for prod run)
21+
RUN sbt stage
22+
23+
# Expose default Play port
24+
EXPOSE 9000
25+
26+
# Run the application (assuming app name is 'myapp')
27+
CMD ["./target/universal/stage/bin/trello-service"]

backend/README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Smart Taskhub - Backend
2+
3+
This is the **backend service** for Smart Taskhub, built with **Play Framework (Scala)** and **PostgreSQL**.
4+
5+
---
6+
7+
## ⚙️ Tech Stack
8+
- **Language:** Scala
9+
- **Framework:** Play Framework (3.0.8)
10+
- **Database:** PostgreSQL
11+
- **Build Tool:** sbt
12+
13+
---
14+
15+
## 🛠 Setup Instructions
16+
### 1. Install Dependencies
17+
Make sure you have:
18+
- **Java 18+**
19+
- **sbt**
20+
- **PostgreSQL**
21+
22+
### 2. Create Database
23+
Make sure PostgreSQL is running and create the database:
24+
```bash
25+
psql -U your_user -c "CREATE DATABASE smart_taskhub;"
26+
```
27+
Or using createdb:
28+
```bash
29+
createdb -U your_user smart_taskhub
30+
```
31+
32+
### 3. Configure Environment
33+
Update `application.conf` or use environment variables:
34+
```bash
35+
DB_URL=jdbc:postgresql://localhost:5432/smart_taskhub
36+
DB_USER=your_user
37+
DB_PASSWORD=your_password
38+
```
39+
40+
### 4. Run the App
41+
```bash
42+
sbt run
43+
```
44+
45+
### 5. Run Tests
46+
```bash
47+
sbt test
48+
```
49+
50+
### 6. Code Quality
51+
```bash
52+
sbt scalastyle
53+
```
54+
## 📂 Project Structure
55+
```bash
56+
backend/
57+
58+
├── api-specs/ # API documentation (Swagger/OpenAPI)
59+
├── app/
60+
│ ├── controllers/ # HTTP controllers
61+
│ ├── db/ # Database configuration and migrations
62+
│ ├── dto/ # Data Transfer Objects
63+
│ ├── exception/ # Exception handling
64+
│ ├── filters/ # Request/response filters
65+
│ ├── init/ # App initialization logic
66+
│ ├── mappers/ # Entity ↔ DTO mappers
67+
│ ├── models/ # Domain models
68+
│ ├── modules/ # Dependency injection modules
69+
│ ├── repositories/ # Data access layer
70+
│ ├── services/ # Business logic
71+
│ ├── utils/ # Utility functions
72+
│ └── validations/ # Custom validations
73+
├── conf/ # Config files (application.conf, routes)
74+
├── postman_collections/ # API collections for testing
75+
├── project/ # sbt project settings
76+
├── public/ # Static assets
77+
├── test/ # Unit and integration tests
78+
├── build.sbt # sbt build file
79+
└── Dockerfile # Docker image definition
80+
```

0 commit comments

Comments
 (0)