Repository navigation
Expand file tree
/
Copy pathprogress.txt
More file actions
157 lines (75 loc) · 7.17 KB
/
Copy pathprogress.txt
File metadata and controls
157 lines (75 loc) · 7.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
progress till now
Phase 1 : Sentinel landing page, complete with a header, a hero section featuring a search bar, a "How It Works" section, and a footer.
Phase 2 : Implemented Map Clicking "View Safety Heatmap" will now take you to the new /map page, which displays a full-screen map alongside a panel ready to show safety reviews. Clicking the map will update the panel header, simulating the selection of a location.
Phase 3 : Backend Setup and Review Submission API
- A fully functional API endpoint for submitting reviews and a frontend form to interact with it.
- Established the backend of our application using Node.js and Express. We'll set up a basic server and create the first API endpoint, which will allow users to submit safety reviews. We will also prepare our project for integration with Firebase Firestore for data storage.
Phase 4 : Fetching Live Reviews and Building the Authentication UI
- build the API endpoint to fetch reviews for a specific location and display them dynamically in the review panel. We will also scaffold the entire User Interface for login and registration, preparing for full authentication in the next phase.
- built a full-stack feature! Your application can write data to a database, read it back based on geographic location, and display it in a clean user interface. You have also built the entire frontend foundation for user authentication.
[Like Login/Signup on the Navbar on the landing page]
Phase 5: Fixing the Star Rating, Enhancing the UI with a Modal, and Full Stack Authentication
- Fix the star rating functionality.
- Refactor the review submission into a sleek, modern modal for a better user experience.
- Implement a complete registration and login system using Firebase Authentication on the backend and connecting our frontend auth pages to it.
- Use React Context to manage the user's authentication state across the entire application.
- implemented a complete, secure, and professional-looking authentication system and significantly improved the core UI of your application.
Debugging : White screen on the Map page
MicroServices :
Phase 6: AI Microservice for Sentiment Analysis
- build a separate service in Python using FastAPI that can analyze text and determine if the sentiment is positive, negative, or neutral. Our main backend will then communicate with this service.
- this sentiment is stored in firestore database
- successfully implemented a microservices architecture. Your main backend now offloads specialized AI tasks to a dedicated Python service, which is a highly scalable and professional pattern for building complex applications.
cd services/sentiment-inference
Debugging : Cannot add review when clicking on map.
## Not Used ##
Phase 7: Real-Time Heatmap Generation
- we can use our AI-generated sentimentScore to create the project's centerpiece: the safety heatmap.
- We won't calculate this on the fly for every user. That would be too slow. Instead, we'll create a backend worker that pre-aggregates safety scores into geographic buckets. A Firebase Cloud Function is perfect for this.
- Implemented the core feature of your application—a real-time, AI-powered safety heatmap.
## Used ##
Phase 7 (Simplified): Live Heatmap via Backend API
- We can create a powerful and visually appealing heatmap without the added setup of Firebase Functions.
- frontend fetch all the review data from our backend and process it in the browser.
- The Trade-off: This method is much easier to set up. However, it's less scalable. If you had millions of reviews, fetching them all to the client would be slow. For a resume project with hundreds or thousands of reviews, it works perfectly and still demonstrates the full-stack skill.
$$ Here the System Design question can arise that
"How will you manage if you have thousands of reviews and millions of reviews ? "
Tbh , fetching them all to the client would be slow. Also using older version affect scalability of application.
it works perfectly for resume level project but cannot work when the number increase above thousands.
Debugging : The Dependency Conflict Error (ERESOLVE)
- Used --legacy-peer-deps to overcome this dependency
Phase 8: GenAI Summarization Microservice
- to create a new, independent microservice that takes all the reviews for an area, feeds them to a powerful language model, and generates a concise, human-readable summary of the safety situation (e.g., "Recent reports mention good street lighting, but some users have noted feelings of unease in nearby alleyways after dark.").
- on the map we can see the "AI-Generated Area Summary",
-> Basically this microservice generates an ai based suggestion based on the reviews for that location (Min 3 reviews);
- Thus, integrated a sophisticated Generative AI feature into your application, significantly elevating its complexity and appeal.
cd services/summarization
Phase 9: Content Moderation Service:
- Build a service to automatically flag and hide toxic or inappropriate reviews.
- The reviews are flagged as "status = "pending_moderation" " in the firestore database.
- We have to manually change this to "status = "approved"" in the database .
Phase 10: User Profiles & Review Management: Allow users to view and manage their own submitted reviews on a profile page.
- created a "My Profile" page where a logged-in user can see a list of all the reviews they have personally submitted. This requires creating our first protected backend route.
Phase 11: Functional Upvoting/Downvoting: Implement the backend logic to make the upvote and downvote buttons on reviews work.
Phase 12: Real-Time Notifications Service: Alert a user via a notification when they enter an area with a low average safety score.
Phase 13: Containerization with Docker: Package each service (frontend, backend, AI) into Docker containers for easy deployment.
Phase 14: CI/CD Automation with GitHub Actions: Create a pipeline to automatically test and deploy your application when you push new code.
Questions for interview
based on microservices
# why imported transformers ? from hugging face ?
#2 its use ?
# why not other ?
## Possible Challenges :
1. React leaflet works in react-17 version, and i generally use react 19
therefore i used "--legacy-peer-deps" with " react-leaflet-heatmap-layer-v3 "
which makes it
"react-leaflet-heatmap-layer-v3 --legacy-peer-deps"
what it does is
(--legacy-peer-deps): This flag tells npm, "I understand the risk. Behave like the older versions of npm and install it anyway, ignoring the peer dependency conflict."
2. I have to start all the microservices servers manually and then the backend
at last the frontend.
I must integrate all of it onto a common server.
3. Also i am using Leaflet library and it good for just frontend purpose but not scalable
i must some day use API to fetch the MAP compnent like google maps API but it is costly.
So it may cause some problems movingforward while deploying.
till now none.