mohsensalm / SwiftLink

SwiftLink is a modern URL shortener with Asp.net Core 8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image 138

Contributors Forks Stargazers Issues MIT License LinkedIn

πŸ“ SwiftLink - Modern Shortener Link Project

dotnet-version

Introduction and Architecture

Welcome to the SwiftLink project, a .NET 8 application designed to streamline link shortening. This README provides comprehensive instructions on how to clone, restore, build, and run the project. Additionally, it covers database migration and the usage of a Redis container via Docker.

Architecture

πŸ’Ύ Getting Started

Prerequisites

Make sure you have the following tools installed on your machine:

.NET 8 SDK Git Docker Cloning the Repository Open your terminal or command prompt and run the following command:

  • bash
git clone https://github.com/mohammadKarimi/SwiftLink.git

This will create a local copy of the SwiftLink repository on your machine.

Restoring Dependencies

Navigate to the project directory:

  • bash
cd SwiftLink

Run the following command to restore project dependencies:

  • bash
dotnet restore

Updating Database and Connection String

For Adding Your Connection String(in Development phase) please add a user-sercret file with visual-studio and locate your connection string there. For Adding Your Connection String(In Production phase) please add your connection string in appsettings.Production.json, locate the connection string and update it accordingly. This connection string is crucial for updating the database during migrations.

  • json
{
  "ConnectionStrings": {
    "DefaultConnection": "YourUpdatedConnectionString"
  },
  // Other configurations...
}

Next, apply the database migrations using the following command:

  • bash
dotnet ef database update

OR

  • PMC (package manager console)
Update-Database

Redis Container

This project utilizes a Redis container to manage caching. Ensure that Docker is running and execute the following command to pull the Redis image:

  • bash
docker pull redis

Once the image is downloaded, start a Redis container:

  • bash
docker run -d -p 6379:6379 --name swiftlink-redis redis

Building and Running the Project

Now that everything is set up, build and run the SwiftLink project using the following commands:

  • bash
dotnet build
dotnet run

Access the application by navigating to https://localhost:44314 in your web browser.

That's it! You've successfully cloned, restored, and run the SwiftLink project with database migration and a Redis container. If you encounter any issues, refer to the project documentation or seek help from the community. Happy coding!

Contributions and bug reports are welcome.

🌈 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

🌟 Support this project

If you believe this project has potential, feel free to star this repo just like many amazing people have.

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

About

SwiftLink is a modern URL shortener with Asp.net Core 8

License:MIT License


Languages

Language:C# 98.7%Language:Dockerfile 1.3%