Scaffold a new full-stack feature for ServerKit with Flask backend (model, service, API blueprint) and React frontend (page, styles, route). Use when creating new modules, pages, or API endpoints.
Scaffold a new full-stack feature named $ARGUMENTS for ServerKit.
Follow these steps in order:
Create backend/app/models/$ARGUMENTS.py with:
id, created_at, updated_atto_dict() method returning JSON-serializable databackend/app/models/Create backend/app/services/${ARGUMENTS}_service.py with:
create_*, get_*, get_all_*, update_*, delete_*{'error': 'message'}, status_codeCreate backend/app/api/$ARGUMENTS.py with:
${ARGUMENTS}_bp@jwt_required()Then register the blueprint in backend/app/__init__.py:
from app.api.$ARGUMENTS import ${ARGUMENTS}_bp
app.register_blueprint(${ARGUMENTS}_bp, url_prefix='/api/v1/$ARGUMENTS')
Add methods to frontend/src/services/api.js in the ApiService class:
get$ARGUMENTS(), create$ARGUMENTS(), update$ARGUMENTS(), delete$ARGUMENTS()Create frontend/src/pages/$ARGUMENTS.jsx with:
Then add the route in frontend/src/App.jsx inside the authenticated routes.
Create frontend/src/styles/pages/$ARGUMENTS.less with:
.${ARGUMENTS}__element--modifier@card-bg, @primary-color, @spacing-md, etc.)frontend/src/styles/main.less