Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MERN Auth Client (TypeScript)

Starter repository for the frontend authentication code-along of a MERN stack app (React + TypeScript + Vite).

Setup

  1. Install dependencies: npm install
  2. Create a .env file based on .env.example and set the backend URL:
    VITE_SERVER_URL=http://localhost:5005
    
  3. Run the app: npm run dev

Structure

src/
├── components/
│   └── Navbar.tsx          # navigation links + logout button
├── context/
│   └── auth.context.tsx    # AuthContext and AuthWrapper (completed during the lesson)
├── pages/
│   ├── auth/
│   │   ├── LoginPage.tsx   # login form (handleLogin completed during the lesson)
│   │   └── SignupPage.tsx  # signup form (handleSignup completed during the lesson)
│   ├── HomePage.tsx
│   ├── ProfilePage.tsx     # getData requests completed during the lesson
│   └── UserListPage.tsx    # getData requests completed during the lesson
├── App.tsx                 # routes
└── main.tsx                # entry point

Routes

Path Page
/ HomePage
/signup SignupPage
/login LoginPage
/profile ProfilePage
/users UserListPage

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages