A simple web application to browse, search, and favorite Catholic saints.
Built with Node.js, Express, EJS, MongoDB, and vanilla JavaScript.
- List all saints with their basic information (birth, death, vocation, country).
- Search saints dynamically by name.
- Mark saints as favorites with a star icon.
- View all saints or only favorited saints.
- Favorites are saved per user in the database.
- Smooth, minimalistic user experience with instant UI updates.
- Backend:
- Node.js
- Express.js
- MongoDB (favorites storage)
- Frontend:
- EJS templates
- Vanilla JavaScript (no frameworks)
- Font Awesome icons (for star/favorite)
-
Clone the repository:
git clone https://github.com/your-username/saints-directory.git cd saints-directory -
Install dependencies:
npm install
-
Environment Variables:
Create a.envfile with the following:MONGODB_URI=your_mongodb_connection_string SESSION_SECRET=your_session_secret -
Run the server:
node server.js
Navigate to
localhost:8080
- When a user logs in and visits the profile page, the server sends:
- The list of saints.
- The list of the user's favorites.
- Saints are dynamically rendered in the frontend.
- Clicking the star toggles the favorite status for a saint.
- Favorites are stored in the
favoritescollection in MongoDB, associated with the user ID. - The interface allows toggling between viewing All Saints and Favorites Only.
- Pagination or lazy loading for large saint databases.
- Add filters by country, century, or vocation.
- Allow viewing full saint profiles with extended biographies.
- Dark mode toggle.
This project is open-source and available under the MIT License.
- Font Awesome for icons.
- Catholic databases for saint data.