Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Twitter Full Stack clone project using .NET, Dependency Injection, Swagger UI, Azure Monitor

License

Notifications You must be signed in to change notification settings

olesuv/Suvorov.LNU.Twitter-Clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A project as a university exam for "Web-tecnologies" class. Clone of popular social network. Project should has basic functions and features, algorithms which are similar or as an official Twitter has too. Current clone was developed only for practice interest.

🛠️ Stack

  • .NET - free, open-source, cross-platform framework for building modern apps and powerful cloud services.
  • Azure - cloud computing platform and a set of services provided by Microsoft for building, deploying, and managing applications and services through Microsoft-managed data centers.
  • Entity Framework - object-relational mapping (ORM) framework for .NET developers that enables them to work with databases using .NET objects, simplifying the process of data access and manipulation.
  • SQL Server - relational database management system (RDBMS) developed by Microsoft that uses SQL (Structured Query Language) to manage and manipulate data, including storing, querying, and retrieving data.
  • App Service - set of cloud-based services provided by Microsoft that enable developers and businesses to build, deploy, and manage applications and services in the cloud, including computing, storage, networking, databases, analytics, and more.
  • MSTest - unit testing framework for .NET developers that allows them to write and execute automated tests to ensure the correctness and reliability of their code.
  • NuGet packages - type of software package used in the Microsoft .NET ecosystem, containing compiled code and other resources, and are used by developers to easily add functionality to their projects and share code between teams.

💻 Installation

To download .NET visit this link and follow instructions for your current OS.

🔧 Configuration

Open your system terminal and run commands:

git clone https://github.com/plxgwalker/Suvorov.LNU.Twitter-Clone.git
cd Suvorov.LNU.Twitter-Clone

Add your already deployed database connection string to files:

In Suvorov.LNU.TwitterClone.Database/NetworkDbContext.cs method OnConfiguring(DbContextOptionsBuilder options) add line of code which below. Instead of ConnectionString add your database connection string. Line of code: options.UseSqlServer("ConnectionString");. Method should look like that:

protected override void OnConfiguring(DbContextOptionsBuilder options)
	{
		options.UseLazyLoadingProxies();
		options.UseSqlServer("ConnectionString");
	}

In Suvorov.LNU.TwitterClone.Web/appsettings.json in "ConnectionStrings" add line: "NetworkConnection": "ConnectionString". Instead of ConnectionString add your database connection string. Code shluld look like this:

  "ConnectionStrings": {
    "NetworkConnection": "ConnectionString"
  }

Than (if you have App Services) add line of your connection string to application insights. Code in Suvorov.LNU.TwitterClone.Web/appsettings.json should look something like that, but also instead of ConnectionString should be yours.

"ApplicationInsights": {
    "LogLevel": {
      "Default": "Information"
    },
    "ConnectionString": "ConnectionString"
  },

Also should be installed list of NuGet packages to folder/project Suvorov.LNU.TwitterClone.Database.

  • Microsoft.EntityFrameworkCore
  • Microsoft.EntityFrameworkCore.Design
  • Microsoft.EntityFrameworkCore.Proxies
  • Microsoft.EntityFrameworkCore.SqlServer
  • Microsoft.EntityFrameworkCore.Tools

🚀 Usage

Than after installation of .NET and all configuration below you can run code running command in your terminal or IDE:

dotnet run

🖌️ Project Diagrams

Project Infrastructure Project Architecture

📝 Decomposition of tasks

  1. Azure deployment

    • Initial deploy ptoject.
    • Database hide connection string.
    • Logs and Application Insights.
    • CI/CD.
  2. Registration Page

    • CreateUserRequest.cs
    • RegisterUser - Razor Pages.
    • Input validation(Check if user written correct regex of name, username, email, password and if confirm password is similar to password).
    • Input validation(Check if information already in use, like "User with current email is already signed up").
    • Sign up with Google.
    • Link to Login Page("Already signed up?").
  3. Login Page

    • LoginUserRequest.
    • LoginUser - Razor Pages.
    • Input validation(Check user email and password from database).
    • Password hashing.
  4. Home Page

    • List of following people's posts.
    • List of recomendation posts.
    • List of recomendation people.
    • List of popular hashtags.
    • Searchbar.
  5. Profile page

    • Count of followers.
    • Count of followings.
    • Dispaly list of whom user follows and also follows current person.
    • Display list of whom reads.
    • List of posts.
    • List of posts which user liked.
  6. Post Page

    • Count of likes, ect.
    • Post text info.
    • Post media info(mb).
    • Hashtags.
  7. Features and algorithms

    • Posts recomendations. Recomendations of posts with hashtag which you like and which posts likes people which liked similar to your post.
    • Friends recomendations. When someone follows your friend, probably you may know this 'someone'.
    • Search of users, posts.
  8. Integration with OpenAI

    • Post generation.
    • Hashtags generation.
  9. API

    • Swagger UI.
    • Postman.

Lab 3

  • Change Home page. Changed home page apperreance.
  • Change Post button. Redesigned post button.
  • Change Post area. Made borders for post apperreance. Kozariz Volodymyr My project Edelveis. Pull request

Lab 4

Lab 4

📱 Contact me

📧 Email 📲 Telegram

About

Twitter Full Stack clone project using .NET, Dependency Injection, Swagger UI, Azure Monitor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published