How davileahy/comunicacao-sem-fronteiras works
Project Type and Purpose
• The project is a front-end web application built in ReactJS. It serves as an aggregator for free language courses, initially focusing on English and integrating multiple learning platforms. It also connects with external services like the Google Books API using Axios.
• Although there is a server.js file and other configuration files that could be used for a simple backend (or server-side serving), most of the logic is embedded within the React application in the src directory.
Main Components
• Frontend Interface:
• Public Directory: Contains static files (e.g., index.html, manifest, robots.txt, sitemap.xml) that bootstrap the application.
• React Application (Inside src/):
• App.js: Handles the routing and serves as the central hub for all pages.
• Components Directory: Contains modular, reusable UI elements like navigation (Nav.js), course cards (CourseCard.js, BookCard.js, MiniCourseCard.js) and interactive features (ChatBot, FilterMenu, SearchBar, etc.).
• Pages Directory: Represents major views of the application (e.g., AllCoursesPage, ChatPage, MainPage, etc.).
• Assets: Contains images and logos used throughout the application.
• Hooks: Custom hooks like useScrollPosition and useScrollToTop enhance interactivity.
• Data: Static datasets (like coursesData.js and questions.js) provide dynamic content for the view.
• Styling and UI Frameworks:
• External Services:
• Google Books API for integration of book data.
• Axios for handling network requests.
Relationships and Interactions
• Routing and Page Flow:
• The App.js component is foundational, setting up routes that map to different pages (found in src/pages).
• Components and pages interact where pages are composed of multiple reusable components from the components folder.
• Data Flow:
• Static data (coursesData, questions) is imported and used by various components.
• API calls (Axios) serve as an interface to the Google Books API, which may feed data into specific components or pages.
• UI and State Management:
• Custom hooks (e.g., useScrollPosition, useScrollToTop) enhance user experience and state control within components.
• Styling:
Architectural Patterns and Design Principles
• Component-Based Architecture:
• Separation of concerns by dividing the UI into reusable components, pages, and assets.
• The App component acts as the orchestrator for the entire UI.
• Single-Page Application (SPA):
• The project uses client-side routing to manage navigation between pages.
• Integration with External Services:
• Modular approach in which third-party APIs (Google Books API) are integrated using Axios.