# 01 | Installation and CLI setup

## Goal

Generate your own project and run its welcome screen with published Flaxon 0.3.0 and Teloce-Py 0.3.0.

## What you are building

Build a project manager with customer accounts, private projects, tasks, staff Admin, CMS help and an optional PWA. Flaxon runs Python APIs; Teloce compiles HTML components and TypeScript. MinifyJS builds production JavaScript without a Node.js build step.

## Install and generate

Use Python 3.12 and a new parent directory. Activate each environment before its installation command.

```bash
python -m venv course_env
# macOS/Linux: source course_env/bin/activate
# Windows PowerShell: .\course_env\Scripts\Activate.ps1
python -m pip install "flaxon[standard,admin]==0.3.0" "teloce-py==0.3.0"
flaxon new project_manager
cd project_manager
# macOS/Linux: source .venv/bin/activate
# Windows PowerShell: .\.venv\Scripts\Activate.ps1
```

## CREATE: requirements.txt

```text
flaxon[standard,admin]==0.3.0
teloce-py==0.3.0
minifyjs==0.1.3
```

## CREATE: requirements-dev.txt

```text
-r requirements.txt
pytest==9.1.1
httpx==0.28.1
playwright==1.51.0
```

Install into the generated project's environment. Do not copy historical `vendor/` wheels or run `prepare_course.py`.

```bash
python -m pip install -r requirements-dev.txt
python -m pip check
python management.py check
python management.py typecheck
python -m flaxon welcome
python management.py runserver
```

The debug server checks on startup and after saved UI edits. A type error is reported without stopping the server. Use the manual command before deployment; production disables automatic checks. See [Type-check Teloce interfaces](../../guides/typecheck.md).

Open http://127.0.0.1:8000/. Show the welcome screen and click its Python API button.
Do not set up staff or run the generated migration yet. Chapter 3 supplies the
ORM models and generates its first Python migration.

## What to say and show at this point

Say: "We generated the starter ourselves. We installed published dependencies, then generated the starter. Next we will build the backend
one module at a time. The customer SPA returns in chapter 8."

Show: the welcome module, `flaxon_cli.py`, `management.py`, and `ui/app.html`.
Explain that the generated starter has its own CSS file; chapter 8 replaces the
shell and removes that file in favour of scoped component CSS.

Stop the server with Ctrl+C before chapter 2. Initialize your own checkpoints with `git init` and `git add .`, then `git commit -m "Chapter 01 setup"`. Do not create a nested
project_manager directory by running the generation command again inside it.
## Expected result

The welcome page loads. Click its API button and see the Python response. The welcome command prints the project name.

## Common errors

If flaxon is missing, activate the environment or use python -m flaxon. Environment creation does not install application dependencies; run the separate installation commands. Do not generate inside the completed repository.

## Short exercise

Find the welcome module's route and the HTML component that calls it.

## What to say and show

Say: "Generate your own project and run its welcome screen. The server remains responsible for persistence and authorization; the browser presents the result."

Show the expected result above, then point to the file responsible for it. Run the chapter check before the next lesson.

## Save your checkpoint

```bash
git add .
git commit -m "Complete chapter 01: Installation and CLI setup"
```
