Neon-AI commited on
Commit
0747e6e
·
verified ·
1 Parent(s): 349fa7f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +70 -0
README.md CHANGED
@@ -8,3 +8,73 @@ pinned: false
8
  ---
9
 
10
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ---
9
 
10
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
11
+
12
+ # NT DB — Neon Tech Database
13
+
14
+ A lightweight JSON-backed database with a REST API and visual dashboard.
15
+
16
+ ---
17
+
18
+ ## Run Locally
19
+
20
+ ```bash
21
+ npm install
22
+ npm start
23
+ # Open: http://localhost:7860
24
+ ```
25
+
26
+ ## API
27
+
28
+ ### Create a table
29
+ ```bash
30
+ curl -X POST http://localhost:7860/rest/v1/schema/tables \
31
+ -H "Content-Type: application/json" \
32
+ -d '{
33
+ "table": "posts",
34
+ "columns": {
35
+ "title": { "type": "string" },
36
+ "body": { "type": "string" }
37
+ }
38
+ }'
39
+ ```
40
+
41
+ ### Insert a row
42
+ ```bash
43
+ curl -X POST http://localhost:7860/rest/v1/posts \
44
+ -H "Content-Type: application/json" \
45
+ -d '{"title": "Hello", "body": "My first post"}'
46
+ ```
47
+
48
+ ### Query rows
49
+ ```bash
50
+ curl http://localhost:7860/rest/v1/posts
51
+ curl "http://localhost:7860/rest/v1/posts?title=eq.Hello"
52
+ curl "http://localhost:7860/rest/v1/posts?order=created_at.desc&limit=10"
53
+ ```
54
+
55
+ ### Update a row
56
+ ```bash
57
+ curl -X PATCH "http://localhost:7860/rest/v1/posts?id=eq.<uuid>" \
58
+ -H "Content-Type: application/json" \
59
+ -d '{"title": "Updated title"}'
60
+ ```
61
+
62
+ ### Delete a row
63
+ ```bash
64
+ curl -X DELETE "http://localhost:7860/rest/v1/posts?id=eq.<uuid>"
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Deploy to Hugging Face Spaces
70
+
71
+ 1. Create a new Space → choose **Docker** SDK
72
+ 2. Upload all files (or push via git)
73
+ 3. In Space settings → **Persistent Storage** → attach a disk mounted at `/data`
74
+ 4. Your NT DB will be live at `https://your-username-nt-db.hf.space`
75
+
76
+ ---
77
+
78
+ ## Dashboard
79
+
80
+ Open the root URL in your browser for the visual table editor.