You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+45-38
Original file line number
Diff line number
Diff line change
@@ -286,43 +286,6 @@ Once the application is running, you can access the Swagger documentation at:
286
286
http://localhost:3000/api
287
287
```
288
288
289
-
## Deployment to Heroku
290
-
291
-
Follow these steps to deploy the application to Heroku:
292
-
293
-
1. Install the Heroku CLI and log in:
294
-
```bash
295
-
npm install -g heroku
296
-
heroku login
297
-
```
298
-
299
-
2. Create a new Heroku app:
300
-
```bash
301
-
heroku create movie-management-api
302
-
```
303
-
304
-
3. Set up the Heroku PostgreSQL add-on:
305
-
```bash
306
-
heroku addons:create heroku-postgresql:hobby-dev
307
-
```
308
-
309
-
4. Configure environment variables:
310
-
```bash
311
-
heroku config:set NODE_ENV=production
312
-
heroku config:set JWT_SECRET=your-secret-key-here
313
-
heroku config:set JWT_EXPIRES_IN=1h
314
-
```
315
-
316
-
5. Deploy the application:
317
-
```bash
318
-
git push heroku main
319
-
```
320
-
321
-
6. Open the application:
322
-
```bash
323
-
heroku open
324
-
```
325
-
326
289
## Project Structure
327
290
328
291
```
@@ -564,6 +527,26 @@ During development, several challenges were addressed:
564
527
- Setting up integration tests with a test database and handling the timestamp format difference between sqlite nad postgres
565
528
- Mocking external dependencies appropriately
566
529
530
+
531
+
### Deployment to Heroku (Template)
532
+
533
+
The repository includes a commented template for automatic deployment to Heroku in the GitHub Actions workflow file. To enable it:
534
+
535
+
1. Uncomment the deployment job in `.github/workflows/node.js.yml`
536
+
2. Set up the following secrets in your GitHub repository:
537
+
-`HEROKU_API_KEY`: Your Heroku API key
538
+
-`HEROKU_APP_NAME`: Your Heroku application name
539
+
-`HEROKU_EMAIL`: Email associated with your Heroku account
540
+
541
+
3. The deployment will automatically:
542
+
- Run after tests pass successfully
543
+
- Deploy only when changes are pushed to main/master
544
+
- Build the application for production
545
+
- Deploy to your Heroku app
546
+
- (Optional) Run database migrations
547
+
548
+
This CI/CD pipeline ensures code quality and provides a streamlined path to production deployment.
549
+
567
550
## Future Improvements
568
551
569
552
1.**Caching Layer:** Implement Redis caching for frequently accessed data
@@ -572,6 +555,30 @@ During development, several challenges were addressed:
572
555
4.**Reporting Module:** Advanced analytics for managers
573
556
5.**Microservices Architecture:** Split into microservices for better scalability
574
557
558
+
559
+
## Resources and References
560
+
561
+
This project has been influenced by various resources on Domain-Driven Design and Hexagonal Architecture. Below are some of the key resources that contributed to the architectural decisions:
562
+
563
+
### Domain-Driven Design
564
+
-[Event Storming — The Storm That Cleans Up The Mess!](https://medium.com/@samar.benamar/event-storming-the-storm-that-cleans-up-the-mess-b2bb578db7c) by Samar Benamar
-[Domain Driven Design: What You Need To Know](https://www.youtube.com/watch?v=4rhzdZIDX_k&list=PLXPfFMrWkdbe8EwRY0oBPHDmC-3oA0bP_&index=2) by Alex Hyett
568
+
-[Event Storming - what it is and why you should use it with Domain-Driven Design](https://www.youtube.com/watch?v=7LFxWgfJEeI) by Amichai Mantinband
569
+
570
+
571
+
### Hexagonal Architecture
572
+
-[Hexagonal Architecture: What You Need To Know](https://www.youtube.com/watch?v=bDWApqAUjEI&list=PLXPfFMrWkdbe8EwRY0oBPHDmC-3oA0bP_&index=3) - by
573
+
Alex Hyett
574
+
-[Hexagonal Architecture](https://medium.com/ssense-tech/hexagonal-architecture-there-are-always-two-sides-to-every-story-bc0780ed7d9c) by Pablo Martinez
575
+
-[Relatives of Onion Architecture: Hexagonal and Clean Architecture Annotations](https://github.com/xmolecules/jmolecules/discussions/70) by @MahatmaFatalError
576
+
-[Designing Microservices Components using Hexagonal Architecture](https://www.sennder.com/tech/designing-microservices-components-using-hexagonal-architecture)
577
+
578
+
These resources have been instrumental in shaping the architecture and implementation of this project. I highly recommend them for anyone looking to deepen their understanding of DDD and Hexagonal Architecture.
579
+
580
+
575
581
## License
576
582
577
-
This project is licensed under the MIT License - see the LICENSE file for details.
583
+
This project is licensed under the MIT License - see the LICENSE file for details.
0 commit comments