This is the backend API for the KotoKatsuyou project — a Japanese verb conjugation learning tool.
The API uses Node.js, Express, and MongoDB (via Mongoose) to serve verb data and support frontend conjugation features.
- RESTful endpoint to retrieve verb data by hiragana or kanji
- Integrated MongoDB for storing structured verb entries
- Modular controller/router structure
- Seed script for preloading the database
- Ready for deployment with environment variable config
git clone https://github.com/yourname/katsuyou-api.git
cd katsuyou-apinpm installCreate a .env file in the root of the project using the provided .env.example:
cp .env.example .envEdit your .env file to point to your local MongoDB or MongoDB Atlas instance:
MONGO_URI=mongodb://localhost:27017/katsuyou-db
PORT=5000To load predefined verb data into MongoDB:
node scripts/seed.jsThis will:
- Connect to MongoDB
- Delete existing verb entries
- Insert all entries from data/verbs.json
GET /api/katsuyou/verb/:word Returns a single verb entry matching either hiragana or kanji. Example:
GET /api/katsuyou/verb/たべるResponse:
{
"hiragana": "たべる",
"kanji": "食べる",
"meaning": "to eat",
"type": "ichidan",
"exampleTemplate": "ごはんを",
"exampleMeaning": "I [verb] rice."
}Frontend Repo (KotoKatsuyou) — React-based UI that consumes this API
License: CC BY-NC-ND 4.0
This project is for personal, non-commercial use only.
You may not redistribute, modify, or republish this code without explicit permission from the author.