2.8 KiB
2.8 KiB
Feature Specification: Project Launch Script
Feature Branch: 003-project-launch-script
Created: 2025-12-20
Status: Draft
Input: User description: "давай создадим скрипт для запуска проекта"
User Scenarios & Testing (mandatory)
User Story 1 - Launch Project (Priority: P1)
As a developer, I want to launch the entire project (backend and frontend) with a single command so that I can start working quickly without manually running multiple commands in different terminals.
Why this priority: This is the core functionality requested. It simplifies the development workflow.
Independent Test: Can be fully tested by running the script and verifying that both backend and frontend services are accessible.
Acceptance Scenarios:
- Given the project is cloned and I am in the root directory, When I run the launch script, Then the script checks for dependencies, installs them if missing, and starts both backend and frontend servers.
- Given the servers are running, When I press Ctrl+C, Then both backend and frontend processes terminate gracefully.
- Given dependencies are missing, When I run the script, Then it installs them before starting the servers.
Edge Cases
- What happens when a port is already in use? The underlying tools (uvicorn/vite) will likely fail or complain. The script should ideally show this output.
- What happens if
python3ornpmis missing? The script should fail with a clear error message.
Requirements (mandatory)
Functional Requirements
- FR-001: The script MUST be executable from the project root (e.g.,
./run.sh). - FR-002: The script MUST check if
python3andnpmare available in the environment. - FR-003: The script MUST check for and install backend dependencies from
backend/requirements.txtif they are missing or outdated. - FR-004: The script MUST check for and install frontend dependencies from
frontend/package.jsonifnode_modulesis missing. - FR-005: The script MUST start the backend application server in development mode.
- FR-006: The script MUST start the frontend application server in development mode.
- FR-007: The script MUST run both backend and frontend processes concurrently.
- FR-008: The script MUST handle
SIGINT(Ctrl+C) to terminate both processes gracefully.
Key Entities (include if feature involves data)
N/A
Success Criteria (mandatory)
Measurable Outcomes
- SC-001: Developers can start the full stack with 1 command.
- SC-002: Both backend and frontend services are accessible via their configured network ports within 30 seconds of running the script (assuming dependencies are installed).
- SC-003: 100% of child processes are terminated when the script is stopped.