Overview
TuneFlow is an iTunes-inspired platform where artists can showcase and sell their music.
Features
- User authentication.
- Discover page.
- E-commerce system.
- Upload music page.
- Checkout page.
- Artist dashboard page.
Technologies
- React
- MUI
Design
Login/Registration Page:
Artist Dashboard Page:
Upload Page:
Checkout Page:
Authentication
import useAuth from 'app/hooks/useAuth'; // import { flat } from 'app/utils/utils'; import { Navigate, useLocation } from 'react-router-dom'; const AuthGuard = ({ children }) => { let { isAuthenticated, // user } = useAuth(); const { pathname } = useLocation(); let authenticated = isAuthenticated; return ( <> {authenticated ? ( children ) : ( <Navigate replace to="/session/signin" state={{ from: pathname }} /> )} </> ); }; export default AuthGuard;
export const authRoles = { sa: ['SA'], // Only Super Admin has access admin: ['SA', 'ADMIN'], // Only SA & Admin has access editor: ['SA', 'ADMIN', 'EDITOR'], // Only SA & Admin & Editor has access guest: ['SA', 'ADMIN', 'EDITOR', 'GUEST'], // Everyone has access }
Checkout the project on GitHub:
TuneFlow
Deniz-Jasa • Updated Apr 3, 2023