A comprehensive personal blogging system with article publishing, comment interactions, user management, and more. Built with modern technology stack including web frontend, backend API, and desktop client.
project-group-3/
āāā backend/ # Backend service
ā āāā src/
ā ā āāā app.js # Main application entry
ā ā āāā data/ # Data access layer
ā ā āāā middleware/ # Middleware
ā ā āāā routes/ # Route definitions
ā ā āāā sql/ # Database initialization
ā āāā public/ # Static files
ā āāā package.json
āāā frontend/ # Frontend application
ā āāā src/
ā ā āāā lib/ # Components and utilities
ā ā āāā routes/ # Page routes
ā āāā static/ # Static resources
ā āāā package.json
āāā JavaSwingInterface/ # Desktop client
ā āāā src/ictgradschool/industry/
ā āāā libs/ # Dependencies
āāā README.md
Clone the repository
git clone <repository-url>
cd project-group-3
Install backend dependencies
cd backend
npm install
Configure environment variables
# Create .env file
echo "PORT=3000" > .env
echo "FRONTEND_ORIGIN=http://localhost:5173" >> .env
Initialize database
# Database will be automatically initialized with sample data
npm run dev
Install frontend dependencies
cd frontend
npm install
Start development server
npm run dev
Compile Java project
cd JavaSwingInterface
# Use IDE or command line to compile
javac -cp "libs/*" src/ictgradschool/industry/swing/*.java
Run client
java -cp "libs/*:src" ictgradschool.industry.swing.Javaswinginterface
Admin Account:
adminadminDemo User:
exampleexampleStart backend service
cd backend
npm run dev
# Service runs on http://localhost:3000
Start frontend service
cd frontend
npm run dev
# Frontend runs on http://localhost:5173
Access the application
http://localhost:5173POST /api/auth/login - User loginPOST /api/auth/register - User registrationGET /api/auth/profile - Get user informationGET /api/articles - Get article listGET /api/articles/:id - Get article detailsPOST /api/articles - Create new articlePUT /api/articles/:id - Update articleDELETE /api/articles/:id - Delete articleGET /api/comments/:articleId - Get article commentsPOST /api/comments - Create commentDELETE /api/comments/:id - Delete commentGET /api/users - Get user listPUT /api/users/:id - Update user informationPOST /api/users/:id/follow - Follow userCode formatting
# Backend
cd backend
npm run format
# Frontend
cd frontend
npm run format
Code linting
# Frontend code linting
cd frontend
npm run lint
The database uses SQLite, located at backend/src/data/database.db. Initialization script is in backend/src/sql/init-db.sql.
backend/src/routes/api/frontend/src/lib/components/init-db.sql to add new tables or fieldsProduction build
# Frontend build
cd frontend
npm run build
# Backend start
cd backend
npm start
Environment configuration
NODE_ENV=productionTeam Pohutukawa - COMPSCI719 Final Project
Team Members:
Project Timeline: January 2025
This project is licensed under the ISC License.
Issues and Pull Requests are welcome!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)For questions or suggestions, please contact:
Pohutukawa - New Zealand's Christmas tree, symbolizing the spiritual bridge connecting heaven and earth, just as our blogging system connects creators with readers.