Skip to content

We will use the Yew web framework along with wasm crates to build a UI with - Authentication - Several different routes and pages - Forms for CRUD support - State management, custom hooks and reducers - Async requests via browser's fetch API

Notifications You must be signed in to change notification settings

juliog922/rust_yew_frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

We will use the Yew web framework along with wasm crates to build a UI with - Authentication - Several different routes and pages - Forms for CRUD support - State management, custom hooks and reducers - Async requests via browser's fetch API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages