Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DevBlog

A full-stack blogging platform built with Django REST Framework (backend) and React + Vite (frontend). Users can sign up, log in, create posts, and read posts from other users.

Screenshot 2026-05-25 170857 Screenshot 2026-05-25 171912 Screenshot 2026-05-25 171456

Tech Stack

Backend — Django 6, Django REST Framework, SQLite (dev) / PostgreSQL (prod), session-based auth with CSRF protection

Frontend — React 19, Vite 8, plain CSS-in-JS (no UI library)


Features

  • User registration and login (session-based)
  • Create and read blog posts
  • Author attribution on each post
  • Responsive layout

Project Structure

.
├── backend/
│   ├── backend/          # Django project settings, URLs, WSGI/ASGI
│   └── posts/            # Posts app — models, serializers, views
└── frontend/
    ├── public/
    └── src/
        ├── App.jsx       # Main app component (all views)
        └── main.jsx      # React entry point

Local Development

Prerequisites

  • Python 3.11+
  • Node.js 20+

Backend

cd backend
python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate
pip install django djangorestframework django-cors-headers
python manage.py migrate
python manage.py runserver      # Runs on http://localhost:8000

Frontend

cd frontend
npm install
npm run dev                     # Runs on http://localhost:5173

Open http://localhost:5173 in your browser.


API Reference

Method Endpoint Auth required Description
GET /api/posts/ No List all posts
POST /api/posts/ Yes Create a post
GET /api/posts/:id/ No Get a single post
DELETE /api/posts/:id/ Yes (owner) Delete a post
POST /api/auth/signup/ No Register a new user
POST /api/auth/login/ No Log in
POST /api/auth/logout/ Yes Log out
GET /api/auth/me/ No Get current user + set CSRF cookie

Deployment

See DEPLOY.md for step-by-step instructions to deploy for free using Railway (backend) and Vercel (frontend).

About

A full-stack blogging platform built with Django REST Framework (backend) and React + Vite (frontend). Users can sign up, log in, create posts, and read posts from other users.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages