A full-stack blog application that allows users to create and manage blog posts. This project was developed as part of the Full Stack Open course by the University of Helsinki, with additional modifications and improvements.
- User authentication (login/register)
- Create, read, update, and delete blog posts
- Like blog posts
- Responsive design
- Secure API with JWT authentication
- Automated testing suite
- React 18
- Vite
- Axios for API requests
- ESLint for code quality
- Playwright for E2E testing
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT for authentication
- Bcrypt for password hashing
- Playwright for E2E testing
- Node.js version 20.11.0 required
- MongoDB instance
- npm or yarn package manager
- Clone the repository
git clone [https://github.com/macro10/blog]
cd blog/backend- Install dependencies
npm install-
Create a
.envfile in the backend directory with the following variables: MONGODB_URI=your_mongodb_connection_string TEST_MONGODB_URI=your_test_mongodb_connection_string PORT=3001 SECRET=your_jwt_secret -
Start the backend server
# Development mode
npm run dev
### Frontend Setup
1. Navigate to the frontend directory
```bash
cd ../frontend- Install dependencies
npm install- Start the development server
npm run devcd playwright
npm testThe application is configured for deployment using Fly.io.
To deploy the full application:
cd backend
npm run deploy:fullThis will:
- Build the frontend
- Copy the build to the backend
- Deploy the application to Fly.io
blog/
├── frontend/
│ ├── src/
│ ├── public/
│ └── dist/
├── backend/
│ ├── controllers/
│ ├── models/
│ ├── utils/
│ └── tests/
└── playwright/
POST /api/login- User loginPOST /api/users- User registration
GET /api/blogs- Get all blogsPOST /api/blogs- Create a new blogPUT /api/blogs/:id- Update a blogDELETE /api/blogs/:id- Delete a blog
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
ISC License
This project is based on the Blog List application from the Full Stack Open course by the University of Helsinki. The core functionality and initial implementation were developed following the course material, with personal modifications and enhancements added.
- Original course material: Full Stack Open
- Course provider: Department of Computer Science, University of Helsinki
- Course license: Creative Commons BY-NC-SA 3.0
McHale Trotter
Project developed as part of Full Stack Open coursework with additional personal modifications.
- University of Helsinki's Full Stack Open course team for the excellent educational material and base implementation
- React and Node.js communities
- Course instructors and staff at the University of Helsinki