Skip to content

Commit a91a136

Browse files
committed
Merge branch 'documentation'
2 parents 04b82ea + 09c0e38 commit a91a136

File tree

131 files changed

+7825
-570
lines changed

Some content is hidden

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

131 files changed

+7825
-570
lines changed

.env.development

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Application
2+
PORT=3000
3+
NODE_ENV=development
4+
5+
# Database
6+
DB_TYPE=postgres
7+
DB_HOST=localhost
8+
DB_PORT=5432
9+
DB_USERNAME=postgres
10+
DB_PASSWORD=example
11+
DB_NAME=movie_management
12+
DB_SYNCHRONIZE=true
13+
DB_LOGGING=true
14+
15+
# JWT
16+
JWT_SECRET=5f2308cac6152783a093846d6e82b60c15087376c07d8599161c4ed1f5654247
17+
JWT_EXPIRES_IN=1h

.env.production

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
PORT=3000
2+
NODE_ENV=production
3+
4+
# Production Database -- set in production
5+
DB_TYPE=postgres
6+
DB_HOST=production-db-host
7+
DB_PORT=5432
8+
DB_USERNAME=secure_username
9+
DB_PASSWORD=secure_password
10+
DB_NAME=movie_management_prod
11+
DB_SYNCHRONIZE=false
12+
DB_LOGGING=false
13+
14+
# JWT Production settings
15+
JWT_SECRET=production_secret_key -- set in production
16+
JWT_EXPIRES_IN=15m

.env.test

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
PORT=3001
2+
NODE_ENV=test
3+
4+
# Test Database (using SQLite for tests)
5+
DB_TYPE=sqlite
6+
DB_NAME=:memory:
7+
DB_SYNCHRONIZE=true
8+
9+
# JWT for testing
10+
JWT_SECRET=454b41d943f87fa73a4bd50e7f55b09255b0f481d8e5f724eacb5d8acd34b446
11+
JWT_EXPIRES_IN=1h

.github/workflows/ci-cd.yml

+63-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Movie Management CI
55

66
on:
77
push:
8-
branches: [ "master", "main", "hexagone", "movie" ]
8+
branches: [ "master", "main", "hexagone", "movie", "ticket", "e2e", "bulk-movies" ]
99
pull_request:
1010
branches: [ "master", "main" ]
1111

@@ -29,3 +29,65 @@ jobs:
2929
- run: npm run build --if-present
3030
- run: npm test
3131

32+
e2e:
33+
runs-on: ubuntu-latest
34+
35+
strategy:
36+
matrix:
37+
node-version: [22.x, 20.x, 18.x, 16.x]
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Use Node.js ${{ matrix.node-version }}
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: ${{ matrix.node-version }}
45+
cache: 'npm'
46+
- run: npm ci
47+
- run: npm run build --if-present
48+
- run: npm run test:e2e
49+
50+
51+
# Uncomment the following job to enable automatic deployment to Heroku
52+
# Note: You'll need to set up the HEROKU_API_KEY and HEROKU_APP_NAME secrets in your GitHub repository
53+
54+
# deploy:
55+
# needs: [test, e2e]
56+
# runs-on: ubuntu-latest
57+
# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
58+
#
59+
# steps:
60+
# - uses: actions/checkout@v4
61+
#
62+
# # Set up Node.js for potential build steps
63+
# - name: Use Node.js
64+
# uses: actions/setup-node@v4
65+
# with:
66+
# node-version: '18.x'
67+
# cache: 'npm'
68+
#
69+
# # Install dependencies
70+
# - run: npm ci
71+
#
72+
# # Build the application if needed
73+
# - run: npm run build
74+
#
75+
# # Deploy to Heroku
76+
# - name: Deploy to Heroku
77+
# uses: akhileshns/[email protected]
78+
# with:
79+
# heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
80+
# heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}
81+
# heroku_email: ${{ secrets.HEROKU_EMAIL }}
82+
# procfile: "web: npm run start:prod"
83+
#
84+
# # Optional: Run database migrations if needed
85+
# # - name: Run database migrations
86+
# # run: |
87+
# # heroku run npm run migration:run --app ${{ secrets.HEROKU_APP_NAME }}
88+
#
89+
# # Optional: Add Health check after deployment
90+
# # - name: Health check
91+
# # run: |
92+
# # sleep 30
93+
# # curl https://${{ secrets.HEROKU_APP_NAME }}.herokuapp.com/health

:memory

16 KB
Binary file not shown.

DEVELOPMENT.md

-6
This file was deleted.

PROCESS_FLOWS.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Here are all the Process Flows in the system:
2+
3+
## Register flow:
4+
![Sample Register Flow](documentation/assets/register-user-flow.png)
5+
6+
## Login flow:
7+
![Sample Register Flow](documentation/assets/login-flow.png)
8+
9+
## Create movie
10+
![Sample Register Flow](documentation/assets/create-movie.png)
11+
12+
## Add session for a movie
13+
![Sample Register Flow](documentation/assets/add-session.png)
14+
15+
## Buy ticket
16+
![Sample Register Flow](documentation/assets/buy-ticket-flow.png)
17+
18+
## Use ticket
19+
![Sample Register Flow](documentation/assets/use-ticket.png)

0 commit comments

Comments
 (0)