@@ -107,45 +107,173 @@ docker compose down -v
107107
108108## Option 2: Manual Setup
109109
110- ### Backend
110+ ### Backend Setup
111+
112+ 1 . ** Install Dependencies**
111113
112114``` bash
113115cd backend
114116npm install
115- npm run dev
116117```
117118
118- Backend runs on:
119+ 2 . ** Set Up Database**
120+
121+ The backend uses PostgreSQL. You can either:
122+ - Use Docker Compose (recommended): ` docker compose up postgres -d `
123+ - Or set up PostgreSQL locally and configure ` DATABASE_URL ` in your ` .env ` file
119124
125+ 3 . ** Run Database Migrations**
126+
127+ ``` bash
128+ npm run prisma:generate
129+ npm run prisma:migrate
120130```
121- http://localhost:3001
131+
132+ 4 . ** Start Development Server**
133+
134+ ``` bash
135+ npm run dev
122136```
123137
138+ Backend runs on: ` http://localhost:3001 `
139+
140+ ** Available Backend Scripts:**
141+ - ` npm run dev ` - Start development server with hot reload
142+ - ` npm run build ` - Build TypeScript to JavaScript
143+ - ` npm run start ` - Start production server
144+ - ` npm run test ` - Run test suite
145+ - ` npm run prisma:generate ` - Generate Prisma client
146+ - ` npm run prisma:migrate ` - Run database migrations
147+ - ` npm run prisma:studio ` - Open Prisma Studio (database GUI)
148+
149+ ** Backend API Documentation:**
150+ - Swagger UI: ` http://localhost:3001/api-docs `
151+ - OpenAPI Spec: ` http://localhost:3001/api-docs.json `
152+
124153---
125154
126- ### 2️ Frontend
155+ ### Frontend Setup
156+
157+ 1 . ** Install Dependencies**
127158
128159``` bash
129160cd frontend
130161npm install
131- npm run dev
132162```
133163
134- Frontend runs on:
164+ 2 . ** Start Development Server **
135165
136- ```
137- http://localhost:3000
166+ ``` bash
167+ npm run dev
138168```
139169
170+ Frontend runs on: ` http://localhost:3000 `
171+
172+ ** Available Frontend Scripts:**
173+ - ` npm run dev ` - Start Next.js development server
174+ - ` npm run build ` - Build for production
175+ - ` npm run start ` - Start production server
176+ - ` npm run lint ` - Run ESLint
177+
178+ ** Environment Variables:**
179+ Create a ` .env.local ` file in the ` frontend ` directory if needed for API endpoints or other configuration.
180+
140181---
141182
142- ### 3️ Smart Contracts
183+ ### Smart Contracts Setup
184+
185+ 1 . ** Install Rust Toolchain**
186+
187+ Make sure you have Rust and Cargo installed. If not:
188+
189+ ``` bash
190+ curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
191+ ```
192+
193+ 2 . ** Install Soroban CLI** (if not already installed)
194+
195+ ``` bash
196+ cargo install --locked soroban-cli
197+ ```
198+
199+ 3 . ** Build Contracts**
143200
144201``` bash
145202cd contracts
146203cargo build --target wasm32-unknown-unknown --release
147204```
148205
206+ The compiled WASM files will be in ` target/wasm32-unknown-unknown/release/ ` .
207+
208+ ** Contract Development:**
209+ - Contract source: ` contracts/stream_contract/src/lib.rs `
210+ - Tests: ` contracts/stream_contract/src/test.rs `
211+ - Build target: ` wasm32-unknown-unknown `
212+
213+ ---
214+
215+ ## Development Scripts & Tools
216+
217+ ### Root-Level Scripts
218+
219+ From the repository root:
220+
221+ ``` bash
222+ # Verify security setup
223+ npm run verify-security
224+ ```
225+
226+ ### Docker Compose Commands
227+
228+ ``` bash
229+ # Start all services
230+ docker compose up --build
231+
232+ # Start in detached mode
233+ docker compose up -d --build
234+
235+ # View logs
236+ docker compose logs -f
237+
238+ # Stop services
239+ docker compose down
240+
241+ # Reset database (removes volumes)
242+ docker compose down -v
243+ ```
244+
245+ ---
246+
247+ ## CI/CD Workflows
248+
249+ This repository uses GitHub Actions for continuous integration. Workflows are located in ` .github/workflows/ ` .
250+
251+ ### Available Workflows
252+
253+ - ** Security Checks** (` .github/workflows/security.yml ` )
254+ - Runs on: push to ` main ` /` develop ` , pull requests, and weekly schedule
255+ - Performs:
256+ - Dependency vulnerability scanning (` npm audit ` )
257+ - CodeQL analysis for JavaScript/TypeScript
258+ - View workflow: [ Security Checks] ( .github/workflows/security.yml )
259+
260+ ### Running CI Checks Locally
261+
262+ Before pushing, ensure your changes pass:
263+
264+ ``` bash
265+ # Frontend linting
266+ cd frontend && npm run lint
267+
268+ # Backend tests
269+ cd backend && npm run test
270+
271+ # Security verification
272+ npm run verify-security
273+ ```
274+
275+ For more details, see the [ Security Workflow] ( .github/workflows/security.yml ) .
276+
149277---
150278
151279# Branching Strategy
0 commit comments