Skip to content

maycon-mdrs/VClients

Repository files navigation

💻 VClients

VClients is a project that aims to manage customer information. It provides a backend API for creating, updating, delete and retrieving customer data (CRUD).

The frontend code can be found in the following repository.

Requirements

For using Docker:

For using local machine:

Project Setup

  1. Clone the repository:
$ git clone https://github.com/maycon-mdrs/VClients.git
  1. Before running the project, ensure to create an .env file following the structure outlined in .env.example. This file should contain all necessary environment variables for Docker to function properly.
Variable Description
ASPNETCORE__DB__NAME The name of your database.
ASPNETCORE__DB__USER The username of your database.
ASPNETCORE__DB__PASSWORD The password of your database.

Make sure the variables in ./VClients.Api/appsettings.json match the values in the .env file.

  • Database=ASPNETCORE__DB__NAME
  • Username=ASPNETCORE__DB__USER
  • Password=ASPNETCORE__DB__PASSWORD

Example:

.env

ASPNETCORE__DB__NAME=vclients
ASPNETCORE__DB__USER=postgres
ASPNETCORE__DB__PASSWORD=12345

appsettings.json

{
    "ConnectionStrings": {
        "DefaultConnection": "Host=vclients.database;Port=5432;Database=vclients;Username=postgres;Password=12345"
    }
}

Run with Docker

Warning

If the commands via prompts don't work to use docker compose, download one of these IDEs and run:

To run the project, use the following command:

$ docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
# http://localhost:5000/
# http://localhost:5000/swagger/

Run using Rider:

  1. When importing the project, select the option docker-compose.yml: Compose Deployment. Rider run

  2. After that, just click the greeen play button to run the project. Rider run

Run using Visual Studio 2022:

  1. When importing the project, select the option docker-compose. Visual Studio 2022 run

  2. After that, just click the greeen play button to run the project. Visual Studio 2022 run

Run with local machine

Warning

Remember to configure the DefaultConnection in ./VClients.Api/appsettings.json correctly according to your PostgreSQL database settings.

Access the VClients.Api package:

$ cd ./VClients.Api/

To run the project, use the following command:

$ dotnet run
# http://localhost:5138/
# http://localhost:5138/swagger/

Folder structure

  • /VClients.Api/* - contains the backend code (API).
  • /Context - contains the database context.
  • /Migrations - contains the database migrations.
  • /Controllers - contains classes or modules that handle the control layer of the application.
  • /Services - contains classes and interfaces that define the application's business logic.
  • /DTOs - contains the DTOs for the application and classes responsible for mapping data between different formats or structures.
  • /Repositories - contains classes and interfaces that define access to database data.
  • /Models - contains the classes that represent your application's data structure.
  • /Extensions - contains classes that extend the functionality of other classes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published