LogVault is a robust, modern RESTful API built with .NET 8 that enables users to manage their logbook activities efficiently and securely. Designed for extensibility and deployment flexibility, it features JWT-based authentication, email notifications, and is fully dockerized for seamless development and production use.
- Features
- Getting Started
- Environment Configuration
- Running with Docker
- API Usage
- Contributing
- License
- User Authentication: Secure login and access control using JWT tokens.
- Activity Management: Create, update, delete, and retrieve user logbook entries, including exporting entries as CSV.
- Email Notifications: Automated emails for critical account events (e.g., password resets).
- Environment Variable Configuration: Sensitive information is managed via environment variables.
- Dockerized: Rapid deployment with Docker and Docker Compose, including a built-in SQL Server database.
These instructions will help you set up and run the LogBook API on your local machine for development and testing purposes.
The API relies on environment variables for configuration. An example file (.env.example) is provided to guide your setup.
-
Clone the repository:
git clone https://github.com/Promise30/Logbook-API.git cd Logbook-API -
Set up environment variables:
- Copy the example file and modify it as needed:
cp .env.example .env
- Edit
.envand fill in your credentials and configuration values (database connection strings, email service credentials, JWT secret, etc.).
- Copy the example file and modify it as needed:
You can quickly spin up the API and its dependencies using Docker Compose.
docker-compose up- This command will launch the API and the SQL Server database defined in
docker-compose.yml. - By default, the API will be accessible at:
The API exposes endpoints for user authentication, logbook entry management, and exporting data. Interactive API documentation is available via Swagger UI at the URLs above.
POST /api/auth/login— Authenticate user and receive JWTPOST /api/logbook— Create a new logbook entryGET /api/logbook— Retrieve logbook entriesPUT /api/logbook/{id}— Update an entryDELETE /api/logbook/{id}— Delete an entryGET /api/logbook/export— Export entries as CSV
Refer to the Swagger UI for the full list and details of available endpoints.
Contributions are welcome! Please fork the repository and submit a pull request. For major changes, open an issue first to discuss your proposed changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or support, please open an issue in the repository.