How ranyaserraj/urbaninvest-investment-platform works
Project type and purpose
• This is a monolithic Java EE web application (“UrbanInvest”) that connects real-estate investors and experts.
• It uses the classic MVC pattern: JSPs for views, Servlets for controllers, Java classes/DAOs for the model, and MySQL for persistence.
File structure
• src/main/webapp → presentation layer
• JSPs (login.jsp, index.jsp, registration.jsp, etudeFinancier.jsp, etudeMarche.jsp…)
• Static assets (CSS, JS, fonts, images) under assets/, css/, js/, fonts/
• WEB-INF/web.xml → servlet mappings
• WEB-INF/lib/mysql-connector-j.jar → JDBC driver
• src/main/java/projet_s3 → controllers and data model
• Servlets: Login.java, RegistrationServlet.java, form1.java, form2.java
• Domain classes: EtudeFinancier.java, EtudeMarche.java
• DAO interfaces/implementations and DaoFactory
• sql/UrbanInvest.sql → database schema
• docs/ → UI mockups and user flows
README for additional insights
• Backend: Java 2EE + Apache Tomcat
• Frontend: JSP + HTML/CSS/JS
• DB: MySQL (XAMPP + phpMyAdmin)
• Features: market studies, financial studies, payment management, email notifications
Main components
a. Client Layer
• Investor/Expert browser application
• Static asset requests (CSS/JS/images)
b. Web Server / Servlet Container
• Apache Tomcat
• web.xml servlet mappings
c. Presentation Layer
• JSP pages rendered to client
• JavaScript (main.js, scripts.js) for UI interactivity
d. Controller Layer
• Servlets (Login, Registration, form1, form2) handle HTTP requests
e. Business & Data Layer
• Domain models (EtudeMarche, EtudeFinancier)
• DAO pattern
– DaoFactory
– EtudeMarcheDAO/Impl, EtudeFinancierDAO/Impl
f. Database
• MySQL database with tables: users, demande_conseil, etude_marche, traitement_conseil, paiement
g. External Services
• Email service (SMTP) for notifications
• phpMyAdmin/XAMPP (for local dev & DB management, optional)
Relationships and interactions
• Browser → (HTTP Request) → Tomcat
• Tomcat → dispatch to Servlet (via web.xml)
• Servlet → calls DAOFactory → DAO → executes SQL via JDBC driver → MySQL
• MySQL → returns result set → DAO → domain objects → Servlet
• Servlet → forwards to JSP → renders HTML → Tomcat → Browser
• Servlet or business logic → sends email via SMTP → User email inbox
Architectural patterns & design principles
• MVC:
• View: JSP + CSS/JS
• Controller: Java Servlets
• Model: Java domain classes + DAO layer
• DAO Factory for decoupling persistence
• Separation of concerns: static assets vs. dynamic content
• Monolithic deployment: single WAR on Tomcat
Technologies & frameworks to annotate
• Java EE (Servlet API)
• JSP / JSTL (if used)
• JDBC + mysql-connector-j (JAR in WEB-INF/lib)
• Apache Tomcat 9.x
• MySQL 5.7+
• HTML5 / CSS3 / JavaScript
Detail
• Don’t just lump all Java code together—distinctly show each servlet, each DAO interface/impl, the factory, and the JDBC link to MySQL
• Call out the static resource path (assets/, css/, js/) as served directly by the container
• Connection string (JDBC URL → sql/UrbanInvest.sql schema)