Skip to content

Commit bdc8c96

Browse files
committed
Refactor code structure for improved readability and maintainability
1 parent 730ad5a commit bdc8c96

File tree

3 files changed

+95
-85
lines changed

3 files changed

+95
-85
lines changed

content/2-Proposal/_index.md

Lines changed: 94 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -6,84 +6,94 @@ chapter: false
66
pre: " <b> 2. </b> "
77
---
88

9-
# Rafilm: AI-Powered Movie Logging & Recommendation Platform
10-
## A Serverless AWS Solution for Intelligent Movie Discovery
9+
# Rafilm: AI-Powered Movie Logging & Recommendation Platform
1110

12-
### 1. Executive Summary
13-
Rafilm is a Letterboxd-inspired movie logging and recommendation platform designed to help general users track their watched films, share reviews, and discover new favorites through AI-powered recommendations. Built as part of the AWS First Cloud Journey (FCJ) internship, Rafilm integrates Amazon Personalize and Bedrock to deliver tailored movie suggestions and conversational recommendations via a chatbot interface.
11+
## A Serverless AWS Solution for Intelligent Movie Discovery
1412

15-
The platform runs fully on AWS Serverless architecture, featuring Amplify-hosted Next.js frontend, Lambda-based backend services connected through API Gateway, and DynamoDB for scalable user and movie data storage. TMDb provides external movie data integration, while Amazon Cognito manages user authentication. Rafilm aims to demonstrate a scalable, intelligent, and cost-efficient architecture capable of supporting multi-user access and interactive experiences.
13+
### 1. Executive Summary
1614

17-
### 2. Problem Statement
15+
Rafilm is a Letterboxd-inspired movie logging and recommendation platform designed to help general users track their watched films, share reviews, and discover new favorites through AI-powered recommendations. Built as part of the AWS First Cloud Journey (FCJ) internship, Rafilm integrates Amazon Personalize and Bedrock to deliver tailored movie suggestions and conversational recommendations via a chatbot interface.
1816

19-
#### What’s the Problem?
20-
While existing movie platforms like Letterboxd and IMDb offer robust logging and social features, they lack **personalized recommendation systems** and **interactive discovery experiences**. Users often rely on external sources or generic trending lists to find what to watch next, leading to irrelevant or repetitive suggestions.
17+
The platform runs fully on AWS Serverless architecture, featuring Amplify-hosted Next.js frontend, Lambda-based backend services connected through API Gateway, and DynamoDB for scalable user and movie data storage. TMDb provides external movie data integration, while Amazon Cognito manages user authentication. Rafilm aims to demonstrate a scalable, intelligent, and cost-efficient architecture capable of supporting multi-user access and interactive experiences.
2118

22-
#### The Solution
23-
Rafilm integrates a **custom recommendation pipeline** powered by **Amazon Personalize**, combined with a **Bedrock LLM chatbot** that interprets user preferences and generates conversational movie recommendations. Users can log movies, write reviews, and receive curated suggestions—all within one seamless experience. Unlike Letterboxd, Rafilm focuses on data-driven personalization and AI-assisted interaction rather than pure social networking.
19+
### 2. Problem Statement
2420

25-
#### Benefits and Return on Investment
26-
By leveraging AWS Serverless services, Rafilm achieves near-zero maintenance cost, pay-per-use scalability, and real-time AI-driven personalization. For the FCJ internship, the project serves as both a **technical showcase** and a **learning artifact** for integrating AI services in serverless architectures. Projected cost remains under $1/month during testing, with AWS Free Tier coverage for most usage.
21+
#### What’s the Problem?
2722

28-
### 3. Solution Architecture
23+
While existing movie platforms like Letterboxd and IMDb offer robust logging and social features, they lack **personalized recommendation systems** and **interactive discovery experiences**. Users often rely on external sources or generic trending lists to find what to watch next, leading to irrelevant or repetitive suggestions.
24+
25+
#### The Solution
26+
27+
Rafilm integrates a **custom recommendation pipeline** powered by **Amazon Personalize**, combined with a **Bedrock LLM chatbot** that interprets user preferences and generates conversational movie recommendations. Users can log movies, write reviews, and receive curated suggestions—all within one seamless experience. Unlike Letterboxd, Rafilm focuses on data-driven personalization and AI-assisted interaction rather than pure social networking.
28+
29+
#### Benefits and Return on Investment
30+
31+
By leveraging AWS Serverless services, Rafilm achieves near-zero maintenance cost, pay-per-use scalability, and real-time AI-driven personalization. For the FCJ internship, the project serves as both a **technical showcase** and a **learning artifact** for integrating AI services in serverless architectures. Projected cost remains under $1/month during testing, with AWS Free Tier coverage for most usage.
32+
33+
### 3. Solution Architecture
2934

3035
Rafilm employs a modular serverless architecture using AWS services for scalability, integration, and cost optimization.
3136

32-
![architecture-diagram](/images/2-Proposal/platform_architecture.jpeg)
33-
34-
#### AWS Services Used
35-
- **AWS Amplify**: Hosts the Next.js frontend for movie browsing, logging, and chatbot interaction.
36-
- **Amazon Cognito**: Handles user registration, login, and session management.
37-
- **Amazon API Gateway**: Routes client requests to backend Lambda functions.
38-
- **AWS Lambda**: Executes serverless business logic (e.g., CRUD for reviews, fetching TMDb data, triggering recommendations).
39-
- **Amazon DynamoDB**: Stores user logs, movie interactions, and preferences.
40-
- **Amazon Personalize**: Trains and serves personalized recommendation models.
41-
- **Amazon Bedrock**: Provides conversational chatbot functionality for recommendation dialogue.
42-
- **Amazon S3**: Stores static assets and backups for logs and model outputs.
43-
44-
#### Component Design
45-
- **Frontend (Next.js)**: User-friendly interface for movie discovery, logging, and chat-based recommendations.
46-
- **Backend (Lambda + API Gateway)**: Stateless logic layer handling user operations, movie fetching, and recommendation retrieval.
47-
- **Data Layer (DynamoDB + S3)**: Stores structured user interactions and movie metadata for model training.
48-
- **AI Layer (Personalize + Bedrock)**: Personalize analyzes historical user interactions; Bedrock chatbot provides natural language access to personalized results.
49-
- **Authentication (Cognito)**: Securely manages multi-user access.
50-
51-
#### Architecture Overview
52-
1. Users log in via Cognito and interact with the Next.js interface.
53-
2. Actions such as logging or rating trigger API Gateway → Lambda → DynamoDB workflows.
54-
3. The Bedrock chatbot accesses Personalize results to generate conversational movie suggestions.
55-
4. Amplify hosts the frontend for seamless deployment and scalability.
56-
57-
### 4. Technical Implementation
58-
59-
#### Implementation Phases
60-
1. **Architecture Design (Month 1):** Research AWS serverless and AI integration patterns; finalize architecture diagrams.
61-
2. **Prototype Integration (Month 2):** Implement Amplify hosting, Cognito authentication, and Lambda-based backend APIs.
62-
3. **Recommendation System (Month 3):** Connect Personalize and Bedrock for end-to-end AI recommendation and chatbot response.
63-
4. **Testing & Deployment:** Conduct functional testing, optimize costs, and deploy production-ready version on Amplify.
64-
65-
#### Technical Requirements
66-
- **Frontend:** Next.js + React hosted via AWS Amplify, using TMDb API for movie data.
67-
- **Backend:** AWS Lambda (Node.js runtime) connected through API Gateway.
68-
- **Database:** Amazon DynamoDB for scalable user and review data.
69-
- **AI Components:** Amazon Personalize (user-item recommendations) and Bedrock (chatbot dialogue).
70-
- **Authentication:** Amazon Cognito for secure, multi-user access.
71-
- **Automation:** AWS SDK & CloudFormation for provisioning; AWS SAM for deployment workflows.
72-
73-
### 5. Timeline & Milestones
74-
75-
| Phase | Duration | Key Deliverables |
76-
|-------|-----------|------------------|
77-
| Month 1 | Research & Architecture | AWS design finalizing |
78-
| Month 2 | Core Development | Amplify hosting, Cognito setup, Lambda API, DynamoDB schema |
79-
| Month 3 | AI Integration & Testing | Personalize training, Bedrock chatbot, system deployment |
80-
| Post-Launch | Continuous Improvement | Cost optimization, new features, UX refinement |
81-
82-
### 6. Budget Estimation
83-
84-
**Estimated Monthly Cost (AWS Free Tier eligible):**
85-
86-
*To be updated*
37+
![architecture-diagram](/images/2-Proposal/solution-architect-rafilm.jpg)
38+
39+
#### AWS Services Used
40+
41+
- **AWS Amplify**: Hosts the Next.js frontend for movie browsing, logging, and chatbot interaction.
42+
- **Amazon Cognito**: Handles user registration, login, and session management.
43+
- **Amazon API Gateway**: Routes client requests to backend Lambda functions.
44+
- **AWS Lambda**: Executes serverless business logic (e.g., CRUD for reviews, fetching TMDb data, triggering recommendations).
45+
- **Amazon DynamoDB**: Stores user logs, movie interactions, and preferences.
46+
- **Amazon Personalize**: Trains and serves personalized recommendation models.
47+
- **Amazon Bedrock**: Provides conversational chatbot functionality for recommendation dialogue.
48+
- **Amazon S3**: Stores static assets and backups for logs and model outputs.
49+
50+
#### Component Design
51+
52+
- **Frontend (Next.js)**: User-friendly interface for movie discovery, logging, and chat-based recommendations.
53+
- **Backend (Lambda + API Gateway)**: Stateless logic layer handling user operations, movie fetching, and recommendation retrieval.
54+
- **Data Layer (DynamoDB + S3)**: Stores structured user interactions and movie metadata for model training.
55+
- **AI Layer (Personalize + Bedrock)**: Personalize analyzes historical user interactions; Bedrock chatbot provides natural language access to personalized results.
56+
- **Authentication (Cognito)**: Securely manages multi-user access.
57+
58+
#### Architecture Overview
59+
60+
1. Users log in via Cognito and interact with the Next.js interface.
61+
2. Actions such as logging or rating trigger API Gateway → Lambda → DynamoDB workflows.
62+
3. The Bedrock chatbot accesses Personalize results to generate conversational movie suggestions.
63+
4. Amplify hosts the frontend for seamless deployment and scalability.
64+
65+
### 4. Technical Implementation
66+
67+
#### Implementation Phases
68+
69+
1. **Architecture Design (Month 1):** Research AWS serverless and AI integration patterns; finalize architecture diagrams.
70+
2. **Prototype Integration (Month 2):** Implement Amplify hosting, Cognito authentication, and Lambda-based backend APIs.
71+
3. **Recommendation System (Month 3):** Connect Personalize and Bedrock for end-to-end AI recommendation and chatbot response.
72+
4. **Testing & Deployment:** Conduct functional testing, optimize costs, and deploy production-ready version on Amplify.
73+
74+
#### Technical Requirements
75+
76+
- **Frontend:** Next.js + React hosted via AWS Amplify, using TMDb API for movie data.
77+
- **Backend:** AWS Lambda (Node.js runtime) connected through API Gateway.
78+
- **Database:** Amazon DynamoDB for scalable user and review data.
79+
- **AI Components:** Amazon Personalize (user-item recommendations) and Bedrock (chatbot dialogue).
80+
- **Authentication:** Amazon Cognito for secure, multi-user access.
81+
- **Automation:** AWS SDK & CloudFormation for provisioning; AWS SAM for deployment workflows.
82+
83+
### 5. Timeline & Milestones
84+
85+
| Phase | Duration | Key Deliverables |
86+
| ----------- | ------------------------ | ----------------------------------------------------------- |
87+
| Month 1 | Research & Architecture | AWS design finalizing |
88+
| Month 2 | Core Development | Amplify hosting, Cognito setup, Lambda API, DynamoDB schema |
89+
| Month 3 | AI Integration & Testing | Personalize training, Bedrock chatbot, system deployment |
90+
| Post-Launch | Continuous Improvement | Cost optimization, new features, UX refinement |
91+
92+
### 6. Budget Estimation
93+
94+
**Estimated Monthly Cost:**
95+
96+
_To be updated_
8797

8898
<!-- | Service | Usage | Monthly Cost |
8999
|----------|--------|--------------|
@@ -99,22 +109,23 @@ Rafilm employs a modular serverless architecture using AWS services for scalabil
99109

100110
<!-- **Total Estimated Cost:** ≈ **$0.7/month** (≈ **$8.40/year**) -->
101111

102-
### 7. Risk Assessment
112+
### 7. Risk Assessment
113+
114+
| Risk | Probability | Impact | Mitigation |
115+
| ------------------------------ | ----------- | ------ | --------------------------------------------- |
116+
| API rate limits from TMDb | Medium | Medium | Cache requests via Lambda |
117+
| Model training cost escalation | Low | Medium | Use limited training dataset for testing |
118+
| Chatbot latency | Medium | Low | Optimize Bedrock model type and response size |
119+
| Authentication or token expiry | Medium | Low | Use short-lived JWTs and refresh tokens |
120+
121+
### 8. Expected Outcomes
103122

104-
| Risk | Probability | Impact | Mitigation |
105-
|------|--------------|---------|------------|
106-
| API rate limits from TMDb | Medium | Medium | Cache requests via Lambda |
107-
| Model training cost escalation | Low | Medium | Use limited training dataset for testing |
108-
| Chatbot latency | Medium | Low | Optimize Bedrock model type and response size |
109-
| Authentication or token expiry | Medium | Low | Use short-lived JWTs and refresh tokens |
110-
| Data loss | Low | High | Backup DynamoDB to S3 regularly |
123+
#### Technical Improvements
111124

112-
### 8. Expected Outcomes
125+
- Demonstrates **serverless integration** of AI/ML and LLM services in real-world use.
126+
- Establishes a reusable AWS architecture for recommendation-based apps.
113127

114-
#### Technical Improvements
115-
- Demonstrates **serverless integration** of AI/ML and LLM services in real-world use.
116-
- Establishes a reusable AWS architecture for recommendation-based apps.
128+
#### Long-Term Value
117129

118-
#### Long-Term Value
119-
- Provides a foundation for future expansion into a **social movie discovery network**.
120-
- Serves as an **AWS FCJ internship showcase project** highlighting scalability, personalization, and conversational AI.
130+
- Provides a foundation for future expansion into a **social movie discovery network**.
131+
- Serves as an **AWS FCJ internship showcase project** highlighting scalability, personalization, and conversational AI.

content/2-Proposal/_index.vi.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Bằng cách tận dụng dịch vụ Serverless của AWS, Rafilm đạt chi ph
2929

3030
Rafilm sử dụng kiến trúc serverless mô-đun trên AWS nhằm đạt khả năng mở rộng, tích hợp và tối ưu chi phí.
3131

32-
![sơ-đồ-kiến-trúc](/images/2-Proposal/platform_architecture.jpeg)
32+
![architecture-diagram](/images/2-Proposal/solution-architect-rafilm.jpg)
3333

3434
#### Dịch vụ AWS sử dụng
3535
- **AWS Amplify**: Host frontend Next.js cho việc duyệt phim, ghi nhật ký và tương tác chatbot.
@@ -107,7 +107,6 @@ Rafilm sử dụng kiến trúc serverless mô-đun trên AWS nhằm đạt kh
107107
| Chi phí huấn luyện mô hình tăng | Thấp | Trung bình | Dùng tập dữ liệu giới hạn cho thử nghiệm |
108108
| Độ trễ của chatbot | Trung bình | Thấp | Tối ưu loại mô hình Bedrock và kích thước phản hồi |
109109
| Xác thực hoặc hết hạn token | Trung bình | Thấp | Dùng JWT thời gian sống ngắn và refresh token |
110-
| Mất dữ liệu | Thấp | Cao | Sao lưu DynamoDB sang S3 định kỳ |
111110

112111
### 8. Kết quả mong đợi
113112

359 KB
Loading

0 commit comments

Comments
 (0)