Spaces:
Runtime error
Runtime error
add: add README
Browse files
README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🚀 AIC Server
|
| 2 |
+
|
| 3 |
+
A high-performance backend service built with **Rust**.
|
| 4 |
+
Easily deployable with **Cargo** or **Docker**, with a built-in Swagger UI for API exploration.
|
| 5 |
+
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
## 📦 Build & Run
|
| 9 |
+
|
| 10 |
+
### 🔨 Option 1: Build with Cargo
|
| 11 |
+
|
| 12 |
+
```bash
|
| 13 |
+
cargo build --release
|
| 14 |
+
./target/release/aic-server
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
### 🐳 Option 2: Build with Docker
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
docker build -t aic-server .
|
| 21 |
+
docker run -p 8080:8080 -e DATABASE_URL="your_database_url_here" aic-server
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## ⚙️ Environment Variables
|
| 27 |
+
|
| 28 |
+
Before running, make sure to set:
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
export DATABASE_URL="postgres://user:password@localhost:5432/db_name"
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
This is required for database connectivity.
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## 📖 API Documentation
|
| 39 |
+
|
| 40 |
+
After starting the server, you can explore the API via **Swagger UI**:
|
| 41 |
+
|
| 42 |
+
👉 [http://localhost:8080/swagger-ui](http://localhost:8080/swagger-ui)
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## 🗂️ Project Structure
|
| 47 |
+
|
| 48 |
+
```text
|
| 49 |
+
AIC Server/
|
| 50 |
+
├── src/ # Source code
|
| 51 |
+
├── Cargo.toml # Rust dependencies
|
| 52 |
+
├── Dockerfile # Container build file
|
| 53 |
+
└── README.md # You're here
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
## ✅ Features
|
| 59 |
+
|
| 60 |
+
- ⚡ Fast & memory-safe (built with Rust)
|
| 61 |
+
- 🐳 Dockerized for easy deployment
|
| 62 |
+
- 📚 Interactive Swagger UI
|
| 63 |
+
- 🗄️ PostgreSQL database support
|
| 64 |
+
|
| 65 |
+
---
|
| 66 |
+
|
| 67 |
+
## 🤝 Contributing
|
| 68 |
+
|
| 69 |
+
Contributions, issues, and feature requests are welcome!
|