TowFinder is a C# project designed to help users find nearby tow operators based on city and district selection. The project utilizes ASP.NET Core 8.0 and Entity Framework Core for a robust and scalable application. The application follows the MVC (Model-View-Controller) pattern to separate concerns and ensure a modular and maintainable codebase. This README provides a comprehensive guide to set up and run the project.
This project was developed as my first C# project, aiming to meet the specific requirements and features requested. Technologies and methodologies were chosen to ensure scalability, maintainability, and ease of deployment.
- ASP.NET Core 8.0: The primary framework for building the web application.
- Entity Framework Core: Used for database operations and management.
- Bootstrap 5: For responsive and modern UI design.
- MySQL: The relational database management system used to store data.
- User-friendly Interface: Select city and district to find nearby tow operators.
- Admin Panel: Admins can approve or reject tow operator registrations.
- Tow Operator Registration: Tow operators can register and manage their profiles.
- Authentication and Authorization: Secure login for admins and tow operators.
- Dynamic Content Loading: Use of AJAX to dynamically load districts based on city selection.
Build and launch TowFinder in a local environment using Docker Compose.
git clone https://github.com/furkanbaran/TowFinder.git
cd TowFinder
docker compose up -d
Once the services are up, visit the application in your browser at: http://localhost:8080/
Follow these steps to set up and run the project on your local machine.
- .NET 8.0 SDK
- Visual Studio 2022 (or later)
- MySQL Server
git clone https://github.com/furkanbaran/TowFinder.git
cd TowFinder
-
Database Configuration: Update the
appsettings.json
file with your MySQL database connection details.{ "ConnectionStrings": { "DefaultConnection": "Server=YOUR_SERVER;Database=YOUR_DATABASE;User=YOUR_USERNAME;Password=YOUR_PASSWORD;" }, "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } } }
-
Default Admin User
A default admin user is provided for initial setup and testing purposes. The credentials are as follows:
- Username: admin
- Password: Admin123!
in program.cs
It is highly recommended to change the default admin password after the first login to ensure security.
-
Environment Variables: Alternatively, you can set up environment variables for sensitive data.
Restore the project dependencies using the .NET CLI.
dotnet restore
Apply the database migrations to set up the database schema.
dotnet ef database update
Run the application using the .NET CLI.
dotnet run
Open your browser and navigate to http://localhost:5000
to see the application in action.
- Controllers: Handle incoming requests and return responses.
- Models: Represent the data and business logic.
- Views: Define the UI elements and layout.
- ViewModels: Transfer data between controllers and views.
- wwwroot: Static files such as CSS, JavaScript, and images.
- Migrations: Database migration files generated by Entity Framework Core.
- Data: Contains the application's DbContext and configuration for Entity Framework Core.
- Entity: Defines the application's data models and entity configurations.
https://towfinder.furkanbaran.com/
Contributions are welcome! If you have any ideas, suggestions, or issues, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- This project was developed as my first C# project, showcasing the learning and implementation of ASP.NET Core and Entity Framework Core. It may contain errors and is not recommended for use in production environments.