This project is an online perfumery store built with ASP.NET Core REST API backend and React-TypeScript frontend. It showcases a modern web application architecture using best practices and popular libraries.
- ASP.NET Core REST API: Robust and scalable backend
- React-TypeScript: Type-safe frontend built with Vite for fast development
- Material-UI (MUI): Sleek and responsive UI components
- Redux: State management for React
- Entity Framework Core: ORM for database operations
- Ardalis Clean Architecture: Organized and maintainable codebase
- JWT Authentication: Secure user authentication
- Google OAuth: Easy sign-in with Google accounts
- Formik & Yup: Form handling and validation
- Axios: HTTP client for API requests
- Postgres: Easy-to-use & well-performing database
- .NET 8 SDK
- Node.js (v14 or later)
- PostgreSQL (or another compatible database)
-
Clone the repository:
git clone https://github.com/yourusername/perfumery-store.git cd perfumery-store/backend
-
Update the connection string in
appsettings.json
to point to your database. -
Apply database migrations:
dotnet ef database update
-
Run the backend:
dotnet run
-
Navigate to the frontend directory:
cd ../frontend
-
Install dependencies:
npm install
-
Create a
.env
file in the frontend root and add the secrets mentioned in env.ts file -
Start the development server:
npm run dev
The frontend will be available at http://localhost:5173
.
The application uses JWT for authentication. To authenticate:
- Register a new user or log in with existing credentials.
- Use the returned JWT token in the
Authorization
header for subsequent requests.
Google OAuth is also available for easy sign-in.
API documentation is available in swagger menu when running the backend in development mode or in README.md in sephora-backend folder.