Skip to content

IrynaZavushchak/StreetCode

 
 

Repository files navigation

SoftServe IT Academy

Streetcode

This is a Back-end part of our Streetcode project. Front-end part: https://github.com/ita-social-projects/StreetCode_Client

Vision

The largest platform about the history of Ukraine, built in the space of cities.

Mission

To fill the gaps in the historical memory of Ukrainians.

Build Status Coverage Status Github Issues Pending Pull-Requests


Table of Contents


Installation

Required to install

Environment

environmental variables

spring.datasource.url=${DATASOURCE_URL}
spring.datasource.username=${DATASOURCE_USER}
spring.datasource.password=${DATASOURCE_PASSWORD}
spring.mail.username=${EMAIL_ADDRESS}
spring.mail.password=${EMAIL_PASSWORD}
cloud.name=${CLOUD_NAME}
api.key=${API_KEY}
api.secret=${API_SECRET}

Clone

Clone this repo to your local machine using:

https://github.com/ita-social-projects/StreetCode

Or if your have an associated SSH key:

git@github.com:ita-social-projects/StreetCode.git

Setup

  1. Change connection string
    (Go to appsettings.json and write your local database connection string)
  2. Create local database
    (Run project and make sure that database was created filled with data)

How to run local

Run the Streetcode project than open your browser and enter https://localhost:5001/swagger/index.html url. If you had this page already opened, just reload it.

How to connect to db locally

  1. launch SQL Server management Studio
  2. In the pop-up window:
    • enter "localhost" as the server name;
    • select "windows authentication" as authentication mechanism;
  3. After the connection has been established, right-click on the server (the first line with the icon), on the left-hand side of the UI
  4. In the the appeared window find and click on "properties"
  5. In the properties section, select "security" page
  6. Make sure that "Server authentication" radio-button is set to "SQL Server and Windows Authentication mode"
  7. Click "Ok"
  8. Then again, on the left-hand side of the UI find folder entitled "Security", and expand it
  9. In unrolled list of options find folder "Logins", and expand it
  10. At this point, you should have "sa" as the last option. If for some reason you do not see it, please refer to https://stackoverflow.com/questions/35753254/why-login-without-rights-can-see-sa-login
  11. Right-click on the "sa" item, select "properties"
  12. Change password to the default system one - "Admin@1234". Don't forget to confirm it afterwards
  13. On the left-hand side select "Status" page, and set "Login" radio-button to "Enabled"
  14. Click "Ok"

Now you can connect to your localhost instance with login (sa) and password (Admin@1234)!

NOTE: Here's the full walkthrough: https://www.youtube.com/watch?v=ANFnDqe4JBk&t=211s.

How to run Docker

  1. In the "build" project, find the "Targets" folder
  2. In the appeared list of classes, find and click on "SetupPublicBuild.cs"
  3. Open the command prompt/PowerShell/linux terminal, go inside of "/Streetcode" directory, and start the "SetupDocker" Target.
cd ./Streetcode
nuke SetupDocker

After waiting for target completion, you should find that the image and running containers for back-end, front-end, db and redis have been successfully created.

NOTE: If order to delete newly created images/containers/volumes, you can utilize the "CleanDocker" Target.

cd ./Streetcode
nuke CleanDocker

That will delete all unnecessary docker-atoms for you.


Usage

How to work with swagger UI

Run the Streetcode project than open your browser and enter https://localhost:5001/swagger/index.html url. If you had this page already opened, just reload it.

How to run API without swagger UI

Run the Streetcode project in any other profile but "Local" and enter http://localhost:5000. Now, you are free to test API-endpoints with Postman or any other tool.

How to run tests

How to Checkstyle


Documentation

Learn more about our documentation here.


Contributing

Git flow

To get started...

Step 1

  • Option 1

    • 🍴 Fork this repo!
  • Option 2

    • 👯 Clone this repo to your local machine using https://github.com/ita-social-projects/StreetCode.git

Step 2

  • HACK AWAY! 🔨🔨🔨

Step 3

Issue flow


Team

Project manager

@IrynaZavushchak

Tech expert

@LanchevychMaxym

Dev team

@PingvinAustr @EyR1oN @Tatiana2424 @AleXLaeR @dimasster @grygorenkod @valllentine


FAQ


Support

Reach out to us at one of the following places!


License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 98.1%
  • Other 1.9%