Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c6c1f36
Add CI to run build on PRs
azeemstack Dec 13, 2025
7784af8
Merge branch 'main' of https://github.com/benazeem/Cinetegrate-backen…
azeemstack Dec 13, 2025
b765132
Resolve Audit & Improve User Routes (Updates, Avatar Upload, Error Ha…
azeemstack Dec 14, 2025
c7705b0
Applied Suggested changes by Copilot
azeemstack Dec 15, 2025
1a00249
Merge branch 'main' of https://github.com/benazeem/Cinetegrate-backen…
azeemstack Dec 15, 2025
127d3f8
Merge pull request #7 from benazeem/API-LogicBuilding
azeemstack Dec 15, 2025
d656499
Added the Models to the backend, Resolve Issue8: Refactor and finaliz…
azeemstack Dec 17, 2025
ed8dac2
Resolve AI Chat suggestions of PR #9
azeemstack Dec 17, 2025
7fe9055
2nd Time Resolved AI Chat suggestions of PR #9
azeemstack Dec 17, 2025
98f4f75
3rd Time Resolved AI Chat suggestions of PR #9
azeemstack Dec 17, 2025
f725cdf
Merge pull request #9 from benazeem/API-LogicBuilding
azeemstack Dec 17, 2025
84afa8a
Added Projects Module + Improve Security + Improve Pagination
azeemstack Dec 31, 2025
f6cf1dd
Merge pull request #11 from benazeem/API-LogicBuilding
azeemstack Dec 31, 2025
846f5d7
Added Story Module + Improve Some Auth and Modeling + DRY implementat…
azeemstack Jan 10, 2026
91a7589
Merge pull request #13 from benazeem/API-LogicBuilding
azeemstack Jan 10, 2026
d40675c
Add scenes module and fix some Context, Auth, User, Project module th…
azeemstack Jan 20, 2026
e09bc24
Checkpoint from VS Code for coding agent session
azeemstack Jan 31, 2026
15bbd76
Merge pull request #14 from benazeem/API-LogicBuilding
azeemstack Jan 31, 2026
7d4382f
Updated All Modules and Added Docker Files
azeemstack Mar 6, 2026
3d95656
Merge branch 'main' of https://github.com/benazeem/Cinetegrate-backen…
azeemstack Mar 6, 2026
f52d45d
Fast Removed Errors for trying EC2
azeemstack Mar 6, 2026
481be9b
setup deploy pipeline
azeemstack Mar 6, 2026
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
9 changes: 6 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
node_modules
dist
npm-debug.log
.git
.gitignore
.vscode
.env
.git
npm-debug.log
dist
Dockerfile*
docker-compose*
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Backend Deploy

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:

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


- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}


- name: Login to ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2


- name: Build and push Docker image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest


- name: Deploy to EC2
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd ~/app
docker compose pull
docker compose up -d
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Design
# Node modules
node_modules/

postman

# Temporary files
npm-temp/
temp/

# Environment variables
.env
.env.local
Expand Down Expand Up @@ -48,3 +54,11 @@ coverage/
# Local certificates
*.pem
*.key

// IDE specific files
.postman/
postman/
.history

.prettierrc

24 changes: 18 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
FROM node:20-alpine AS builder

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build


FROM node:20-alpine

WORKDIR /app

# Install dev dependencies (nodemon) and app deps
COPY package*.json ./
RUN npm ci

# If you prefer nodemon global: RUN npm install -g nodemon
# Copy only when building image layer for deps (source will be mounted at runtime)
# Expose the port your app uses
RUN npm install --omit=dev

COPY --from=builder /app/dist ./dist

EXPOSE 4000

CMD ["npm", "run", "dev"]
CMD ["node", "dist/server.js"]
11 changes: 11 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:20-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install

EXPOSE 4000

CMD ["npm", "run", "dev"]
21 changes: 21 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3.9"

services:
backend:
build:
context: .
dockerfile: Dockerfile.dev

container_name: backend-dev

volumes:
- .:/app
- /app/node_modules

env_file:
- .env

ports:
- "4000:4000"

command: npm run dev
17 changes: 17 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: "3.9"

services:
backend:
build:
context: .
dockerfile: Dockerfile

container_name: backend-prod

ports:
- "4000:4000"

env_file:
- .env

restart: always
18 changes: 18 additions & 0 deletions example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
PORT = 4000
DEV_CLIENT_URL='http://localhost:4000'

DB_PASSWORD=
DB_USERNAME =
ACCESS_TOKEN_SECRET =
REFRESH_TOKEN_SECRET =
ACCESS_TOKEN_EXPIRES_IN= any number of minutes
REFRESH_TOKEN_EXPIRES_IN = any number of days

DEV_SMTP_HOST=
DEV_SMTP_PORT=
DEV_SMTP_USER=
DEV_SMTP_PASS=
EMAIL_FROM=
APP_URL=
PASSWORD_RESET_EXPIRES_MIN=
MAILER_API=
Loading