Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/api/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Neon PostgreSQL connection string
DATABASE_URL=postgresql://user:password@host/dbname?sslmode=require
42 changes: 42 additions & 0 deletions packages/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# @devasign/api

Hono-based REST API for the DevAsign bounty marketplace.

## Stack

- [Hono](https://hono.dev/) — lightweight TypeScript web framework
- [Drizzle ORM](https://orm.drizzle.team/) — type-safe ORM
- [Neon](https://neon.tech/) — serverless PostgreSQL
- [Vitest](https://vitest.dev/) — test runner

## Getting started

```bash
cp .env.example .env
# set DATABASE_URL in .env

npm install
npm run dev
```

## Testing

```bash
npm test
```

## Endpoints

| Method | Path | Description |
|--------|------|-------------|
| GET | `/health` | Health check |
| GET | `/bounties/:id` | Full bounty detail (issue #21) |

## Database

Generate migrations from the Drizzle schema:

```bash
npm run db:generate
npm run db:migrate
```
10 changes: 10 additions & 0 deletions packages/api/drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { Config } from "drizzle-kit";

export default {
schema: "./src/db/schema/index.ts",
out: "./drizzle",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL!,
},
} satisfies Config;
Loading