Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 2.33 KB

README.md

File metadata and controls

41 lines (28 loc) · 2.33 KB

Rust Frontend with WebAssembly and Yew

Project Overview

This project demonstrates how to build a complex web application using Rust, WebAssembly (Wasm), and the Yew framework. It covers various aspects of frontend development, including authentication, routing, form handling, state management, and asynchronous requests. The project aims to showcase the power and flexibility of Rust in web development, providing a comprehensive guide for developers looking to explore Rust and WebAssembly for frontend applications.

Features

  • Authentication: Secure user authentication and session management.
  • Routing: Multiple routes and pages including Home, Login, and NotFound pages.
  • Forms for CRUD Operations: Create, Read, Update, and Delete functionalities for interacting with backend APIs.
  • State Management: Efficient state handling using Yew's context and custom hooks.
  • Async Requests: Making asynchronous requests to web APIs using the browser's fetch API.

Lessons and Progress

  1. Initial Setup: Project structure and basic features implementation.
  2. Login Form: Creating a Login form and logging user input to the console.
  3. Backend Connection: Establishing a connection with the backend using Rocket in Docker and implementing successful API calls from the frontend form.
  4. Routing: Implementing routing for Home and NotFound pages.
  5. User Context: Creating and integrating user context for enhanced user experience.
  6. Sidebar: Adding a sidebar for improved navigation.
  7. Session Storage and Logout: Implementing session storage and a logout button for session management.
  8. CRUD Interface for Rustaceans: Starting the CRUD interface for the /rustaceans endpoint.
  9. CRUD Interface for Crates: Completing the CRUD interface for the /crates endpoint.

Getting Started

Prerequisites

  • Good knowledge of Rust
  • Understanding of HTTP, REST, JSON, HTML, and CSS
  • Experience with frontend frameworks (React-like frameworks)

Usage

Once the project is running, you can access it in your web browser. Navigate through different routes, interact with forms, and experience the seamless integration of Rust and WebAssembly in a modern web application.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.