/SimpleBlog

Blog app built with .NET & NextJs

Primary LanguageC#

SimpleBlog

  • A blog app built with .NET and NextJs.

Features

  1. User Authentication

    • User registration and login functionality
    • Only authenticated users can create, update, or delete posts
    • Unauthenticated users can only view posts
  2. Posting

    • CRUD operations for blog posts (Create, Read, Update, Delete)
    • Posts stored in a database using MSSQL.
  3. Client

    • Home page that lists all blog posts.
    • Post detail page to view content of a specific post.
    • Forms for creating and editing posts (only accessible to authenticated users).
    • Login and registration page.

Running the application.

Clone the repository

git clone https://github.com/adamchairly/SimpleBlog.git
cd SimpleBlog

Backend

Initial migration

cd Backend
dotnet ef database update

or in Package Manager Console

Update-Database

Then you can build the solution and that will run the server on localhost:7000

Frontend

cd Frontend
npm install

create a file named called .env.local with this value:

NEXT_PUBLIC_API_BASE_URL=https://localhost:7000

then

npm run dev

It will run the client on localhost:3000