How craniacshencil/campusswap works
Main Components
Frontend Layer:
• Vue.js Single Page Application (SPA)
• Vuex Store (state management)
• Custom Components
• Pages/Views
• Asset Management
Backend Layer:
• Django REST Framework
• Authentication System
• Multiple Django Apps:
• admin_actions
• apis
• products
• payments
• PostgreSQL Database
• Third-party Services:
• ImgBB API (image hosting)
• Razorpay API (payments)
Client Layer
Frontend Layer
API Gateway
Backend Services
Database Layer
External Services
Component Relationships
• Client browsers connect to Vue.js frontend
• Frontend communicates with Django backend through REST APIs
• Backend services interact with PostgreSQL database
• Payment service connects to Razorpay
• Image handling connects to ImgBB
• Admin actions flow through dedicated admin routes
Specific Component Details
Frontend (Vue.js):
• Main pages (Home, Buy, Sell, Resources, Admin Dashboard)
• Vuex store for state management
• Custom components structure
Backend (Django):
• Four main Django apps and their responsibilities:
• admin_actions: Administrative operations
• apis: Student/User management
• products: Listing management
• payments: Payment processing
Database:
• Main tables: Users, Products, Resources, Payments
• Relationships between tables
Additional Elements
Security Layer:
• Authentication flow
• Admin approval process
• User registration validation
Data Flow:
• Product listing flow
• Payment processing flow
• Resource management flow
Important Notes
• Environment configuration (.env)
• Development vs production setup
• Separation between frontend dev server (Vite) and Django server
• Points of integration with third-party services
Recommendations
• Maintain consistent styling
• Version information
• Notes for scaling considerations
• Document authentication flow separately
Remember to include both development and production configurations, as they differ in terms of server setup and build processes.