├── backend ├── accounts │ ├── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ ├── urls.py │ ├── serializers.py │ └── views.py ├── blog │ ├── __init__.py │ ├── asgi.py │ ├── wsgi.py │ ├── urls.py │ └── settings.py ├── posts │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ └── 0001_initial.py │ ├── forms.py │ ├── tests.py │ ├── apps.py │ ├── admin.py │ ├── pagination.py │ ├── urls.py │ ├── mixins.py │ ├── permissions.py │ ├── models.py │ ├── serializers.py │ └── views.py ├── media │ └── media │ │ └── 2.jpg ├── requirements.txt ├── manage.py └── README.md ├── frontend └── blog-app │ ├── src │ ├── Containers │ │ ├── Authentication │ │ │ ├── Logout │ │ │ │ ├── Logout.module.css │ │ │ │ └── Logout.js │ │ │ ├── Signup │ │ │ │ ├── Signup.module.css │ │ │ │ └── Signup.js │ │ │ ├── ForgotPass │ │ │ │ ├── ForgotPass.module.css │ │ │ │ └── ForgotPass.js │ │ │ ├── Signin │ │ │ │ ├── Signin.module.css │ │ │ │ └── Signin.js │ │ │ ├── ResetPass │ │ │ │ └── ResetPass.js │ │ │ └── Auth.module.css │ │ ├── Home │ │ │ ├── Home.module.css │ │ │ └── Home.js │ │ └── Profile │ │ │ ├── Profile.module.css │ │ │ └── Profile.js │ ├── Components │ │ ├── Content │ │ │ ├── Content.module.css │ │ │ └── Content.js │ │ └── UI │ │ │ ├── Backdrop │ │ │ ├── Backdrop.module.css │ │ │ └── Backdrop.js │ │ │ ├── Toolbar │ │ │ ├── Navigation │ │ │ │ ├── Navigation.module.css │ │ │ │ ├── NavigationItems │ │ │ │ │ ├── NavigationItems.module.css │ │ │ │ │ ├── NavigationItem │ │ │ │ │ │ ├── NavigationItem.js │ │ │ │ │ │ └── NavigationItem.module.css │ │ │ │ │ └── NavigationItems.js │ │ │ │ └── Navigation.js │ │ │ ├── Toolbar.module.css │ │ │ ├── HamBurger │ │ │ │ ├── HamBurger.js │ │ │ │ └── HamBurger.module.css │ │ │ └── Toolbar.js │ │ │ ├── SideDrawer │ │ │ ├── SideDrawer.module.css │ │ │ └── SideDrawer.js │ │ │ ├── PageNotFound │ │ │ ├── PageNotFound.module.css │ │ │ └── PageNotFound.js │ │ │ ├── PasswordShowHide │ │ │ ├── PasswordShowHide.module.css │ │ │ └── PasswordShowHide.js │ │ │ └── Footer │ │ │ ├── Footer.module.css │ │ │ └── Footer.js │ ├── hoc │ │ └── Wrap │ │ │ └── Wrap.js │ ├── App.css │ ├── setupTests.js │ ├── App.test.js │ ├── index.css │ ├── reportWebVitals.js │ ├── index.js │ ├── App.js │ └── logo.svg │ ├── public │ ├── robots.txt │ ├── logo.png │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── apple-touch-icon.png │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── site.webmanifest │ ├── manifest.json │ └── index.html │ ├── .gitignore │ ├── package.json │ └── README.md ├── .vscode └── settings.json ├── README.md └── .gitignore /backend/accounts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/blog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/posts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/posts/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/posts/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms -------------------------------------------------------------------------------- /backend/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models -------------------------------------------------------------------------------- /frontend/blog-app/src/Containers/Authentication/Logout/Logout.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/blog-app/src/Containers/Authentication/Signup/Signup.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.formatting.provider": "black" 3 | } -------------------------------------------------------------------------------- /frontend/blog-app/src/Containers/Authentication/ForgotPass/ForgotPass.module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/posts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/media/media/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ExpressHermes/Blog-API/HEAD/backend/media/media/2.jpg -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/Content/Content.module.css: -------------------------------------------------------------------------------- 1 | .content{ 2 | min-height: calc(100vh - 120px); 3 | } -------------------------------------------------------------------------------- /frontend/blog-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /backend/posts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PostsConfig(AppConfig): 5 | name = 'posts' 6 | -------------------------------------------------------------------------------- /frontend/blog-app/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ExpressHermes/Blog-API/HEAD/frontend/blog-app/public/logo.png -------------------------------------------------------------------------------- /frontend/blog-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ExpressHermes/Blog-API/HEAD/frontend/blog-app/public/favicon.ico -------------------------------------------------------------------------------- /frontend/blog-app/src/hoc/Wrap/Wrap.js: -------------------------------------------------------------------------------- 1 | const Wrap = (props) => { 2 | return(props.children) 3 | } 4 | 5 | export default Wrap; -------------------------------------------------------------------------------- /backend/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | name = "accounts" 6 | -------------------------------------------------------------------------------- /frontend/blog-app/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ExpressHermes/Blog-API/HEAD/frontend/blog-app/public/favicon-16x16.png -------------------------------------------------------------------------------- /frontend/blog-app/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ExpressHermes/Blog-API/HEAD/frontend/blog-app/public/favicon-32x32.png -------------------------------------------------------------------------------- /frontend/blog-app/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ExpressHermes/Blog-API/HEAD/frontend/blog-app/public/apple-touch-icon.png -------------------------------------------------------------------------------- /backend/posts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Post 3 | 4 | # Register your models here. 5 | admin.site.register(Post) 6 | -------------------------------------------------------------------------------- /frontend/blog-app/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ExpressHermes/Blog-API/HEAD/frontend/blog-app/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /frontend/blog-app/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ExpressHermes/Blog-API/HEAD/frontend/blog-app/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /frontend/blog-app/src/Containers/Home/Home.module.css: -------------------------------------------------------------------------------- 1 | .helperText{ 2 | padding: 20px; 3 | font-family: monospace; 4 | margin: 20px; 5 | background-color: #ddd; 6 | } -------------------------------------------------------------------------------- /frontend/blog-app/src/App.css: -------------------------------------------------------------------------------- 1 | *{ 2 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; 3 | } -------------------------------------------------------------------------------- /backend/posts/pagination.py: -------------------------------------------------------------------------------- 1 | from rest_framework.pagination import ( 2 | LimitOffsetPagination, 3 | ) 4 | 5 | class PostLimitOffsetPagination(LimitOffsetPagination): 6 | default_limit = 10 7 | max_limit = 10 -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/UI/Backdrop/Backdrop.module.css: -------------------------------------------------------------------------------- 1 | .BackDrop{ 2 | width: 100%; 3 | z-index:900; 4 | height: 100vh; 5 | background-color: #44444480; 6 | position: fixed; 7 | top: 0; 8 | left: 0; 9 | } -------------------------------------------------------------------------------- /frontend/blog-app/src/Containers/Authentication/Logout/Logout.js: -------------------------------------------------------------------------------- 1 | import {Redirect} from 'react-router-dom'; 2 | 3 | const logout = () => { 4 | return( 5 | 6 | ) 7 | } 8 | 9 | export default logout; -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/UI/Toolbar/Navigation/Navigation.module.css: -------------------------------------------------------------------------------- 1 | .navBar{ 2 | width: fit-content; 3 | float: right; 4 | } 5 | 6 | @media screen and (max-width: 900px){ 7 | .navBar{ 8 | display: none; 9 | } 10 | } -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/UI/SideDrawer/SideDrawer.module.css: -------------------------------------------------------------------------------- 1 | .SideDrawer{ 2 | position: fixed; 3 | right: 0; 4 | top: 0; 5 | height: 100vh; 6 | width: 80%; 7 | max-width: 500px; 8 | z-index: 1000; 9 | transition: 0.4s all ease-in-out; 10 | } -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/UI/Toolbar/Navigation/NavigationItems/NavigationItems.module.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width:900px) { 2 | .NavigationItems { 3 | padding: 80px 0; 4 | background-color: #fff; 5 | height: 100%; 6 | width: 100%; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /frontend/blog-app/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /frontend/blog-app/public/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /frontend/blog-app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /frontend/blog-app/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | /node_modules 3 | /.pnp 4 | .pnp.js 5 | 6 | # Frontend 7 | # testing 8 | /coverage 9 | 10 | # production 11 | /build 12 | 13 | # misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | .eslintcache 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/UI/Backdrop/Backdrop.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import classes from './Backdrop.module.css'; 4 | 5 | const backDrop = (props) => { 6 | return ( 7 |
12 |
) 13 | } 14 | 15 | export default backDrop; -------------------------------------------------------------------------------- /backend/accounts/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import UserCreateAPIView, UserListAPIView, UserDetailAPIView 3 | 4 | app_name = "accounts" 5 | 6 | urlpatterns = [ 7 | path("", UserListAPIView.as_view(), name="user_detail"), 8 | path("register/", UserCreateAPIView.as_view(), name="user_create"), 9 | path("/", UserDetailAPIView.as_view(), name="user_detail"), 10 | ] -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/UI/Toolbar/Toolbar.module.css: -------------------------------------------------------------------------------- 1 | .toolBar{ 2 | height: 70px; 3 | padding: 3px 20px; 4 | box-sizing: border-box; 5 | background-color:rgb(138, 23, 80); 6 | color: #eee; 7 | } 8 | 9 | .logo{ 10 | height: calc(100%); 11 | display: inline-block; 12 | width: fit-content; 13 | margin: 0 0; 14 | /* border: 2px solid white; */ 15 | } 16 | 17 | .logo img{ 18 | height: 100%; 19 | } 20 | -------------------------------------------------------------------------------- /frontend/blog-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /frontend/blog-app/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /backend/blog/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for blog project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blog.settings") 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /backend/blog/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for blog project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blog.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/UI/Toolbar/Navigation/Navigation.js: -------------------------------------------------------------------------------- 1 | import NavigationItems from './NavigationItems/NavigationItems'; 2 | import Wrap from '../../../../hoc/Wrap/Wrap'; 3 | 4 | import classes from './Navigation.module.css'; 5 | 6 | const Navigation = () => { 7 | return( 8 | 9 |
10 | {}} 12 | /> 13 |
14 |
15 | ) 16 | } 17 | 18 | export default Navigation; -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/UI/Toolbar/HamBurger/HamBurger.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import classes from './HamBurger.module.css'; 4 | 5 | const hamBurger = (props) => { 6 | return ( 7 |
8 |
9 |
10 |
11 |
12 | ); 13 | } 14 | 15 | export default hamBurger; -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/UI/Toolbar/HamBurger/HamBurger.module.css: -------------------------------------------------------------------------------- 1 | .Burger{ 2 | height: 40px; 3 | margin: 13.5px 0; 4 | float: right; 5 | width: 45px; 6 | cursor: pointer; 7 | } 8 | 9 | .Burger:focus{ 10 | outline: none; 11 | } 12 | 13 | .bar{ 14 | width: 80%; 15 | height: 4px; 16 | margin: 4.2px; 17 | background-color: rgb(219, 219, 219); 18 | border: 1px solid rgb(231, 231, 231); 19 | border-radius: 5px; 20 | } 21 | 22 | @media screen and (min-width:900px){ 23 | .Burger{ 24 | display: none; 25 | } 26 | } -------------------------------------------------------------------------------- /frontend/blog-app/src/Components/Content/Content.js: -------------------------------------------------------------------------------- 1 | import Wrap from '../../hoc/Wrap/Wrap'; 2 | import Toolbar from '../UI/Toolbar/Toolbar'; 3 | import Footer from '../UI/Footer/Footer'; 4 | 5 | import classes from './Content.module.css'; 6 | 7 | const content = (props) => { 8 | return( 9 | 10 | 11 |
12 | {props.children} 13 |
14 |