A full-stack web application for boxing management with comprehensive user authentication features.
- User Authentication (Register/Login)
- JWT-based Session Management
- Email Verification
- Password Reset Functionality
- Responsive Design
- Framework: Node.js/Express
- Language: TypeScript
- Database: PostgreSQL with Prisma ORM
- Authentication: JWT
- Validation: Zod
- Email Service: Resend
- Framework: React with Vite
- Styling: TailwindCSS + DaisyUI
- State Management: React Query
- Routing: React Router
- HTTP Client: Axios
├── backend/ # Node.js/Express backend
│ ├── prisma/ # Database schema and migrations
│ └── src/
│ ├── config/ # Configuration files
│ ├── constants/ # Constants and enums
│ ├── controller/ # Request handlers
│ ├── db/ # Database client
│ ├── middleware/ # Express middleware
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ └── util/ # Utility functions
├── frontend/ # React frontend
│ └── src/
│ ├── assets/ # Static assets
│ ├── components/ # React components
│ ├── config/ # Frontend configuration
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility libraries
│ └── pages/ # Page components
└── views/ # EJS templates
- Node.js
- PostgreSQL
- npm
- Clone the repository
git clone https://github.com/yourusername/boxing_crud_app.git
cd boxing_crud_app- Install backend dependencies
cd backend
npm install- Install frontend dependencies
cd frontend
npm installDATABASE_URL=your_postgresql_url
DIRECT_URL=your_postgresql_direct_url
PORT=4004
NODE_ENV=development
APP_ORIGIN=http://localhost:5173
JWT_SECRET=your_jwt_secret
JWT_REFRESH_SECRET=your_jwt_refresh_secret
EMAIL_SENDER=your_email
RESEND_API_KEY=your_resend_api_key
VITE_API_URL=http://localhost:4004
- Start the backend:
cd backend
npm run dev- Start the frontend:
cd frontend
npm run devAccess the application at:
- Frontend: http://localhost:5173
- Backend: http://localhost:4004
POST /auth/register- Register new userPOST /auth/login- User loginGET /auth/logout- User logoutGET /auth/refresh- Refresh access tokenGET /auth/email/verify/:code- Verify emailPOST /auth/password/forgot- Request password resetPOST /auth/password/reset- Reset password
GET /user- Get user profile
npm run dev # Start development server
npm run build # Build TypeScript
npm start # Start production servernpm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint- React documentation
- Express.js documentation
- Prisma documentation
- TailwindCSS documentation
- DaisyUI documentation