Initial commit - PromptTech

This commit is contained in:
2026-01-27 18:07:00 -06:00
commit 3959a223bf
262 changed files with 128736 additions and 0 deletions

205
README.md Normal file
View File

@@ -0,0 +1,205 @@
# PromptTech Solutions E-Commerce Platform
A full-stack e-commerce platform with admin dashboard, user management, inventory control, and service booking capabilities.
## 🚀 Quick Start
```bash
# Start both backend and frontend with PM2
./scripts/start_with_pm2.sh
# Check service status
./scripts/check_status.sh
# Stop all services
./scripts/stop_pm2.sh
```
**Access the application:**
- Frontend: http://localhost:5300
- Backend API: http://localhost:8181
- API Docs: http://localhost:8181/docs
**Admin Login:**
- Email: admin@techzone.com
- Password: admin123
## 📁 Project Structure
```
PromptTech_Solution_Site/
├── backend/ # FastAPI backend server
├── frontend/ # React frontend application
├── docs/ # Documentation
│ ├── features/ # Feature documentation
│ ├── guides/ # User guides
│ └── reports/ # Technical reports
├── scripts/ # Utility scripts
├── tests/ # Test files
├── test_reports/ # Test execution reports
├── logs/ # Application logs
├── Logo/ # Brand assets
└── archive/ # Archived files
```
For detailed structure, see [WORKSPACE_STRUCTURE.md](WORKSPACE_STRUCTURE.md)
## 🛠️ Technology Stack
**Backend:**
- Python 3.x
- FastAPI 2.0
- SQLAlchemy (Async ORM)
- PostgreSQL
- Bcrypt & JWT Authentication
**Frontend:**
- React 19
- TipTap 3.15 (Rich Text Editor)
- Tailwind CSS
- shadcn/ui Components
- Axios
## ✨ Features
### Customer Features
- Product catalog with multi-image support
- Service booking system
- Shopping cart and checkout
- Order history and tracking
- User authentication and profiles
- Product reviews and ratings
### Admin Dashboard
- **User Management:** Create and manage users with 5 role levels (Admin, User, Employee, Accountant, Sales Manager)
- **Inventory Management:** Full CRUD with active/inactive toggle, filters, and pagination
- **Product Management:** Multi-image upload, rich text descriptions, stock tracking
- **Service Management:** Service catalog, bookings, and scheduling
- **Order Management:** Order processing, status updates, tracking
- **Category Management:** Product and service categorization
- **Reports:** Sales reports, inventory reports (CSV/PDF export)
## 📚 Documentation
### Guides
- [Quick Start Guide](docs/guides/QUICK_START.md)
- [Admin Guide](docs/guides/ADMIN_GUIDE.md)
- [PM2 Process Manager Guide](docs/guides/PM2_GUIDE.md)
- [Usage Guide](docs/guides/USAGE_GUIDE.md)
### Feature Documentation
- [User Management System](docs/features/USER_MANAGEMENT_FEATURE.md)
- [Multi-Image & Rich Text](docs/features/FEATURE_MULTI_IMAGE_RICHTEXT.md)
- [Inventory Features](docs/features/INVENTORY_FEATURES.md)
### Technical Reports
- [Database Optimization](docs/reports/DATABASE_OPTIMIZATION_REPORT.md)
- [Performance Fixes](docs/reports/PERFORMANCE_FIXES.md)
- [Test Results](docs/reports/test_result.md)
## 🗄️ Database
**PostgreSQL Database:**
- Database: techzone
- User: techzone_user
- Port: 5432
- Tables: 15+ tables (users, products, services, orders, etc.)
## 🔧 Development
### Backend Setup
```bash
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python server.py
```
### Frontend Setup
```bash
cd frontend
npm install
npm start
```
### Create Admin User
```bash
cd backend
source venv/bin/activate
python create_admin.py
```
## 🧪 Testing
```bash
# Run backend tests
python tests/backend_test.py
# Run admin feature tests
./scripts/verify_admin_features.sh
# Test database integration
./scripts/test_database_integration.sh
```
## 📦 Deployment
The application uses PM2 for process management:
```bash
# Start services
pm2 start scripts/ecosystem.config.json
# Monitor services
pm2 monit
# View logs
pm2 logs
# Restart services
pm2 restart all
```
## 🔐 Environment Variables
**Backend (.env):**
```
DATABASE_URL=postgresql+asyncpg://techzone_user:techzone_pass@localhost:5432/techzone
SECRET_KEY=your-secret-key-here
CORS_ORIGINS=http://localhost:5300
```
**Frontend (.env):**
```
REACT_APP_BACKEND_URL=http://localhost:8181
```
## 🤝 Contributing
1. Keep code organized in respective folders
2. Update documentation for new features
3. Write tests for new functionality
4. Follow existing code style and conventions
## 📝 Recent Updates (January 12, 2026)
- ✅ Complete rebranding to PromptTech Solutions
- ✅ User management system with RBAC (5 roles)
- ✅ Inventory filters and pagination
- ✅ Multi-image upload with rich text editor
- ✅ Performance optimizations
- ✅ Workspace organization and documentation
## 📞 Support
For questions or issues:
1. Check the [Quick Start Guide](docs/guides/QUICK_START.md)
2. Review [Technical Reports](docs/reports/)
3. Check [Feature Documentation](docs/features/)
---
**Company:** PromptTech Solutions
**Version:** 2.0.0
**Last Updated:** January 12, 2026