https://github.com/captkay/m2-project-json-server
A ready-to-use JSON Server backend for story CRUD apps. Provides RESTful /stories API with genres, cover images, and timestamps—deployed on Render.com for instant prototyping or as a live API for frontend projects.
https://github.com/captkay/m2-project-json-server
backend crud data-store demo demo-backend deployed-api fake-api headless instant-api json-server mock-api no-auth open-source prototyping render rest-api restful stories storybook webapp
Last synced: 5 months ago
JSON representation
A ready-to-use JSON Server backend for story CRUD apps. Provides RESTful /stories API with genres, cover images, and timestamps—deployed on Render.com for instant prototyping or as a live API for frontend projects.
- Host: GitHub
- URL: https://github.com/captkay/m2-project-json-server
- Owner: CaptKay
- Created: 2025-08-05T17:09:46.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-08-16T13:34:28.000Z (5 months ago)
- Last Synced: 2025-08-16T15:27:38.669Z (5 months ago)
- Topics: backend, crud, data-store, demo, demo-backend, deployed-api, fake-api, headless, instant-api, json-server, mock-api, no-auth, open-source, prototyping, render, rest-api, restful, stories, storybook, webapp
- Language: JavaScript
- Homepage: https://m2-project-json-server.onrender.com
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```markdown
# 📖 Mystic Stories JSON Server API
Simple RESTful backend API for the [Mystic Stories App](https://kay-story-book-app.netlify.app).
Powered by [JSON Server](https://github.com/typicode/json-server) and deployed on [Render.com](https://render.com/).
---
## 🌐 Live API
- **Base URL:** `https://m2-project-json-server.onrender.com`
---
## 📚 What Is This?
A fake API backend to support story CRUD operations in a decoupled, modern web app.
- Stores stories as JSON objects (with cover images, genres, etc)
- Instantly deployable/forkable—no login or database config needed
- Ideal for rapid prototyping, hackathons, or frontend demos
---
## 🗄️ API Endpoints
| Method | Endpoint | Function |
|--------|----------------|----------------------|
| GET | `/stories` | Get all stories |
| GET | `/stories/:id` | Get single story |
| POST | `/stories` | Create a new story |
| PUT | `/stories/:id` | Update a story |
| DELETE | `/stories/:id` | Delete a story |
---
## 📝 Story Object Example
```
{
"id": "uuid-string",
"title": "The Mystic Sword",
"description": "A tale of ancient power.",
"content": "Full story text here...",
"coverImage": "https://res.cloudinary.com/your-cloud/image/upload/...",
"status": "published",
"genres": ["Fantasy", "Adventure"],
"createdAt": "2024-06-26T13:22:00.000Z",
"updatedAt": "2024-06-26T13:22:00.000Z"
}
```
---
## 🚀 Local Development
1. **Install JSON Server:**
```
npm install -g json-server
```
2. **Create/Edit `db.json`:**
```
{
"stories": []
}
```
3. **Run the server:**
```
json-server --watch db.json --port 3001
```
Now you can send API requests to `http://localhost:3001/stories`.
---
## 🌍 Deployment
- **Hosted on [Render.com](https://render.com/docs/deploy-json-server)**
- API auto-redeploys on db.json changes (if connected via Git)
- You can fork, duplicate, or redeploy your own copy as needed
---
## 🙏 Credits
- [typicode/json-server](https://github.com/typicode/json-server)
- [Render.com Community Examples](https://render.com/docs/deploy-json-server)
---
## 📝 License
This project is licensed under the [MIT License](./LICENSE).
---
> **Note:** This repo contains only API and data (no frontend).
For the React app, see: [Mystic Stories App Frontend Repo](https://github.com/yourusername/stories-app)