opengrammar-server 2.0.189663 → 2.0.642591

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/README.npm.md +0 -95
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opengrammar-server",
3
- "version": "2.0.189663",
3
+ "version": "2.0.642591",
4
4
  "description": "Privacy-first, open-source grammar intelligence server — run it on any device",
5
5
  "homepage": "https://opengrammer.eu.cc",
6
6
  "repository": {
package/README.npm.md DELETED
@@ -1,95 +0,0 @@
1
- # opengrammar-server
2
-
3
- > Privacy-first, open-source grammar intelligence server — run it on **any device**.
4
-
5
- [![npm version](https://img.shields.io/npm/v/opengrammar-server)](https://www.npmjs.com/package/opengrammar-server)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
-
8
- Turn **any device** into a local OpenGrammar API server — your old Android phone via Termux, a Raspberry Pi, an old laptop, or any VPS.
9
-
10
- ## Quick Start
11
-
12
- ```bash
13
- # Run instantly (no install needed)
14
- npx opengrammar-server
15
-
16
- # Or install globally
17
- npm install -g opengrammar-server
18
- opengrammar-server
19
- ```
20
-
21
- That's it. Your server is live at `http://localhost:8787` 🎉
22
-
23
- ## Options
24
-
25
- ```bash
26
- opengrammar-server --port 3000 # Custom port
27
- opengrammar-server --host 127.0.0.1 # Localhost only (more secure)
28
- opengrammar-server --help # Show all options
29
- opengrammar-server --version # Show version
30
- ```
31
-
32
- ## API Endpoints
33
-
34
- | Method | Endpoint | Description |
35
- |--------|----------|-------------|
36
- | `GET` | `/` | Status dashboard |
37
- | `GET` | `/health` | Health check |
38
- | `POST` | `/analyze` | Grammar analysis |
39
- | `POST` | `/autocomplete`| Text completion |
40
- | `GET` | `/providers` | List AI providers |
41
-
42
- ### Example
43
-
44
- ```bash
45
- # Check health
46
- curl http://localhost:8787/health
47
-
48
- # Analyze text
49
- curl -X POST http://localhost:8787/analyze \
50
- -H "Content-Type: application/json" \
51
- -d '{"text": "Me and him went to store yesterday"}'
52
- ```
53
-
54
- ## 🤖 Run on Android (Termux)
55
-
56
- Turn your old Android phone into a grammar server!
57
-
58
- ```bash
59
- # 1. Install Termux from F-Droid (not Play Store)
60
- # 2. Inside Termux:
61
- pkg update && pkg install nodejs
62
- npx opengrammar-server --port 8787
63
- ```
64
-
65
- Your phone is now a grammar server accessible on your local network at `http://<phone-ip>:8787`.
66
-
67
- ## 🍓 Run on Raspberry Pi
68
-
69
- ```bash
70
- curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
71
- sudo apt-get install -y nodejs
72
- npx opengrammar-server
73
- ```
74
-
75
- ## 🐳 Docker
76
-
77
- ```bash
78
- docker run -p 8787:8787 swadhinbiswas/opengrammar-backend:latest
79
- ```
80
-
81
- ## Environment Variables
82
-
83
- | Variable | Description |
84
- |----------|-------------|
85
- | `PORT` | Server port (default: `8787`) |
86
- | `HOST` | Bind host (default: `0.0.0.0`) |
87
- | `GROQ_API_KEY` | Groq API key for AI features (optional) |
88
- | `OPENAI_API_KEY` | OpenAI API key (optional) |
89
-
90
- ## Links
91
-
92
- - 🌐 **Website:** https://opengrammer.eu.cc
93
- - 📦 **GitHub:** https://github.com/swadhinbiswas/opengrammar
94
- - 🐛 **Issues:** https://github.com/swadhinbiswas/opengrammar/issues
95
- - ☁️ **Hosted API:** https://opengrammar-backend-production.thelabrats-dev.workers.dev