https://github.com/akarazhev/ai-driven-development-101
AI-Driven Development 101: a practical course + full‑stack project (FastAPI + React). Learn agents, prompting, and ship a social media automation app.
https://github.com/akarazhev/ai-driven-development-101
agents ai automation course docker education fastapi llm podman prompting react social-media sqlmodel tailwindcss vite
Last synced: about 2 months ago
JSON representation
AI-Driven Development 101: a practical course + full‑stack project (FastAPI + React). Learn agents, prompting, and ship a social media automation app.
- Host: GitHub
- URL: https://github.com/akarazhev/ai-driven-development-101
- Owner: akarazhev
- License: mit
- Created: 2025-11-27T15:32:18.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-17T08:37:22.000Z (6 months ago)
- Last Synced: 2026-04-13T04:36:11.610Z (about 2 months ago)
- Topics: agents, ai, automation, course, docker, education, fastapi, llm, podman, prompting, react, social-media, sqlmodel, tailwindcss, vite
- Language: HTML
- Homepage: https://github.com//ai-driven-development-101/tree/main/doc/course
- Size: 576 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AI-Driven-Development-101
Full-stack Confluence Publisher App implementing the course project (Chapter 06).
## Stack
- Backend: Spring Boot 3.4, JPA/Hibernate, SQLite
- Frontend: Angular 20 + TypeScript + TailwindCSS
## Prerequisites
- Java 21+
- Gradle 8+ (or use included gradlew)
- Node.js 18+ and npm
## Setup
1) Start backend
```bash
cd backend
./gradlew bootRun
```
2) Frontend
```bash
cd frontend
npm install
npm start
# or
ng serve
```
Open http://localhost:4200 and ensure the backend is running on http://localhost:8080.
## Project structure
```
backend/
src/main/java/com/confluence/publisher/
controller/ # REST controllers (Page, Attachment, Schedule, Confluence, AI)
service/ # Business logic (PageService, AttachmentService, PublishService, ScheduleService)
repository/ # JPA repositories
entity/ # JPA entities (Page, Attachment, Schedule, PublishLog, etc.)
dto/ # Request/Response DTOs
provider/ # Provider adapter pattern (BaseProvider, ConfluenceStubProvider)
scheduler/ # Background scheduler for queued pages
config/ # Spring configuration and properties
exception/ # Global exception handling
src/main/resources/
application.yml # Application configuration
frontend/
src/pages/ # ComposePage, Schedules
src/app/ # app component and routing
data/ # sqlite database (gitignored)
storage/attachments/ # uploaded files (gitignored)
```
## API quickstart
- Health: GET /api/health
- Upload attachment: POST /api/attachments (multipart: file, description?)
- Create page: POST /api/pages { title, content, spaceKey, attachmentIds }
- Publish now: POST /api/confluence/publish { pageId }
- Schedule: POST /api/schedules { pageId, scheduledAt? }
- List schedules: GET /api/schedules
## Tests
```bash
cd backend
./gradlew test
```
## Notes
- The Confluence provider is a stub by default; configure real Confluence API integration for production.
- For production, configure a proper database and storage, secure API tokens, and harden CORS.
- Confluence URL and space configuration available via environment variables.
## Containerization (Docker/Podman)
The repo includes Dockerfiles for backend and frontend and a docker-compose.yml for local runs with Docker or Podman.
### Quickstart (Docker)
- Build and run
```bash
docker compose up --build
```
- Open
- Frontend: http://localhost:4200
- Backend: http://localhost:8080/api/health
- Stop / clean
```bash
docker compose down # stop containers
docker compose down -v # also remove volumes (DB/attachments)
```
### Quickstart (Podman)
- macOS hosts require the Podman VM:
```bash
podman machine start
```
- Build and run
```bash
podman-compose -f podman-compose.yaml up --build
```
- Open
- Frontend: http://localhost:4200
- Backend: http://localhost:8080/api/health
- Stop / clean
```bash
podman-compose -f podman-compose.yaml down
podman-compose -f podman-compose.yaml down -v
```
> **Note**: Both containers run as non-root users for rootless Podman compatibility. Nginx listens on port 8080 (non-privileged) inside the container.
### Compose services and ports
- backend
- Image: built from backend/Dockerfile (Spring Boot 3.4, JDK 21)
- Port: 8080:8080 (host:container)
- Runs as non-root user (`appuser`, UID 1000)
- Volumes: named `data` (SQLite at /data/app.db), `attachments` (/storage/attachments)
- Env (loaded from `.env` file):
- `CONFLUENCE_URL`, `CONFLUENCE_USERNAME`, `CONFLUENCE_API_TOKEN`
- `CONFLUENCE_DEFAULT_SPACE`, `CONFLUENCE_PROVIDER`
- `SCHEDULER_INTERVAL_SECONDS`, `CORS_ORIGINS`
- frontend
- Image: built from frontend/Dockerfile (Angular 20, nginx)
- Port: 4200:8080 (host:container, nginx on non-privileged port)
- Build arg: `NG_APP_API_BASE=http://localhost:8080` so the browser calls the backend via host port 8080.
### Customizing configuration
- Backend environment variables (Spring Boot properties with `APP_` prefix):
- `APP_DATABASE_URL` (default `jdbc:sqlite:./data/app.db` in dev, `jdbc:sqlite:///data/app.db` in container)
- `APP_ATTACHMENT_DIR` (default `storage/attachments`, container uses `/storage/attachments`)
- `APP_CONFLUENCE_URL` (Confluence instance URL)
- `APP_CONFLUENCE_DEFAULT_SPACE` (default Confluence space key)
- `APP_CONFLUENCE_API_TOKEN` (API token for authentication)
- `APP_PROVIDER` (`confluence-stub` by default)
- `APP_SCHEDULER_INTERVAL_SECONDS` (default `5`)
- `APP_CORS_ORIGINS` comma-separated list of allowed origins
- Frontend API base
- Set at build time via compose `build.args.NG_APP_API_BASE` (default `http://localhost:8080`).
- Change when deploying behind another host/port, then rebuild the frontend image.
### Build images manually (optional)
```bash
# Backend image
docker build -t confluence-backend -f backend/Dockerfile .
docker run --rm -p 8080:8080 \
-e APP_DATABASE_URL=jdbc:sqlite:///data/app.db \
-e APP_ATTACHMENT_DIR=/storage/attachments \
-v confluence_data:/data -v confluence_attachments:/storage/attachments \
confluence-backend
# Frontend image
docker build -t confluence-frontend \
--build-arg NG_APP_API_BASE=http://localhost:8080 \
-f frontend/Dockerfile .
docker run --rm -p 4200:8080 confluence-frontend
```
### Data persistence
- Compose uses named volumes: `data` for the SQLite DB and `attachments` for uploaded files.
- Remove volumes with `docker compose down -v` (or `podman compose down -v`). This will delete your DB and uploaded attachments.
### Troubleshooting
- Port already in use
- Change host ports in docker-compose.yml (e.g., `8081:8080` for backend, `4201:8080` for frontend).
- CORS blocked
- Add your origin to `CORS_ORIGINS` in `.env` file and recreate containers.
- Frontend cannot reach backend
- Ensure backend is mapped to host port 8080 and frontend is built with `NG_APP_API_BASE` pointing to `http://localhost:8080`.
- Rebuild the frontend image after changing `NG_APP_API_BASE`.
- Podman on SELinux hosts (Linux)
- If you bind host directories instead of volumes, append `:Z` to volume mounts for proper labeling.
- macOS Podman
- Ensure `podman machine start` before running compose commands.
- Slow or stale frontend
- Rebuild frontend: `docker compose build frontend` (or Podman equivalent).
## Course documentation
- Overview: [doc/course/README.md](doc/course/README.md)
- Chapters
1. [01. Introduction to AI](doc/course/01-introduction-to-ai/README.md)
2. [02. Agents](doc/course/02-agents/README.md)
3. [03. Setup Cursor AI](doc/course/03-setup-cursor-ai/README.md)
4. [04. Setup Context7](doc/course/04-setup-context7/README.md)
5. [05. AI-Driven Software Development](doc/course/05-ai-driven-software-development/README.md)
6. [06. Project: Confluence Publisher App](doc/course/06-project-confluence-publisher-app/README.md)
### Additional resources
- [Cursor Learn — Official Course](https://cursor.com/learn)
- [Cursor Directory: Rules](https://cursor.directory/rules)