verse index
This project is a backend API for retrieving topical Bible verses based on curated themes.
The application integrates an external Bible API, stores verse data in a MySQL database, and exposes REST endpoints for querying topics, verses, and user favorites.
CORE FUNCTIONALITY
All functionality is accessed through REST endpoints and tested using Hoppscotch. Users can:
retrieve available verse categories through the topics endpoint
query all verses or filter verses by topic
save and retrieve user-specific favorite verses.
The API supports full CRUD operations.
Read operations allow users to retrieve topics and verses.
Create operations allow users to save favorite verses.
Update operations allow modification of existing records.
Delete operations allow users to remove favorites and confirm changes.
Database constraints enforce valid operations and prevent duplicate entries.
database design
The database includes four main entities. These are Users, Topics, Verses, and Favorites.
Topics have a one-to-many relationship with verses.
Users have a one-to-many relationship with favorites.
Verses also have a one-to-many relationship with favorites.
Users and verses form a many-to-many relationship through the favorites table.
Constraints
Foreign keys enforce data integrity within the relational database.
Cascade rules maintain consistency across related records.
Composite unique constraints prevent duplicate favorites from being stored.
application structure
The application follows the MVC pattern to maintain organization and scalability.
Models define the database schema and relationships using Sequelize.
Controllers handle request logic and data processing.
Routes define REST endpoints and connect them to controller functions.
The server file initializes the Express application and environment configuration.
tech stack
Node.js
Express.js
MySQL
Sequelize
dotenv
Axios / Fetch for external API integration
Hoppscotch for API testing
For Fill implementation details, view the project repository.