A modern WordPress alternative built entirely with Angular 20 and server-side TypeScript (NestJS), replacing PHP with a fully TypeScript-based architecture.
- 100% TypeScript - Both frontend and backend
- WordPress-Compatible Database - Uses WordPress schema for easy migration
- Modern Architecture - Angular 19 with standalone components + NestJS backend
- JWT Authentication - Secure token-based authentication
- NGXS State Management - Predictable state container
- RESTful API - Clean, well-documented API endpoints
- Docker Support - Easy deployment with Docker Compose
- 100% Test Coverage Goal - Comprehensive testing with Jasmine/Karma
# Start everything (MySQL + API + Frontend)
docker compose -f docker-compose.dev.yml up --build
# Access the application
# Frontend: http://localhost:4200
# API: http://localhost:3000
# MySQL: localhost:3306See DOCKER_SETUP.md for detailed Docker instructions.
Prerequisites:
- Node.js 18+
- MySQL 8.0+
- npm or yarn
1. Setup MySQL Database
mysql -u root -p
CREATE DATABASE angular_press CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;2. Start the API
cd angular-press-api
npm install
cp .env.example .env # Update with your MySQL credentials
npm run start:dev3. Start the Frontend
cd angular-press
npm install
npm start4. Access the Application
- Frontend: http://localhost:4200
- API: http://localhost:3000/api
# With Docker
.\start-docker.ps1
# Without Docker (requires local MySQL)
.\start-local.ps1- Framework: Angular 19 with standalone components
- State Management: NGXS
- Styling: CSS with modern design
- Routing: Angular Router with lazy loading
- HTTP: HttpClient with interceptors
- Framework: NestJS (TypeScript)
- Database: TypeORM with MySQL
- Authentication: JWT with Passport
- Validation: class-validator
- API: RESTful with versioning support
- Engine: MySQL 8.0
- Schema: WordPress-compatible tables
wp_users- User accountswp_posts- Posts and pageswp_terms- Categories and tagswp_term_taxonomy- Taxonomy relationshipswp_term_relationships- Post-term associations
wp-angular-app/
βββ angular-press/ # Angular frontend
β βββ src/
β β βββ app/
β β β βββ components/ # UI components
β β β βββ core/ # Core services & models
β β β βββ features/ # Feature modules
β β β βββ services/ # Business logic services
β β β βββ store/ # NGXS state management
β β βββ environments/ # Environment configs
β βββ Dockerfile
β βββ package.json
β
βββ angular-press-api/ # NestJS backend
β βββ src/
β β βββ auth/ # Authentication module
β β βββ posts/ # Posts module
β β βββ entities/ # TypeORM entities
β β βββ app.module.ts # Main application module
β β βββ main.ts # Application entry point
β βββ scripts/ # Database scripts
β βββ Dockerfile
β βββ package.json
β
βββ docker-compose.yml # Production Docker setup
βββ docker-compose.dev.yml # Development Docker setup
βββ README.md
Frontend Tests
cd angular-press
npm test # Run tests
npm run test:coverage # Run with coverageBackend Tests
cd angular-press-api
npm test # Run tests
npm run test:cov # Run with coverage# Lint
npm run lint
# Format
npm run formatdocker compose -f docker-compose.dev.yml up --builddocker compose up --build -d# View logs
docker compose logs -f
# Stop services
docker compose down
# Clean everything
docker compose down -v
docker system prune -aSee DOCKER_SETUP.md for comprehensive Docker documentation.
Register
POST /api/auth/register
Content-Type: application/json
{
"username": "john",
"email": "john@example.com",
"password": "password123",
"displayName": "John Doe"
}Login
POST /api/auth/login
Content-Type: application/json
{
"username": "john",
"password": "password123"
}Get Current User
GET /api/auth/me
Authorization: Bearer <token>List Posts
GET /api/posts?page=1&limit=10&status=publishedGet Post
GET /api/posts/:idCreate Post
POST /api/posts
Authorization: Bearer <token>
Content-Type: application/json
{
"title": "My Post",
"content": "<p>Content here</p>",
"status": "published"
}Update Post
PATCH /api/posts/:id
Authorization: Bearer <token>Delete Post
DELETE /api/posts/:id
Authorization: Bearer <token>See angular-press-api/API_SETUP.md for complete API documentation.
The project aims for 100% code coverage.
Current Coverage:
- Frontend: ~76% (working towards 100%)
- Backend: TBD
Run All Tests:
# Frontend
cd angular-press && npm test
# Backend
cd angular-press-api && npm testAPI (.env)
DB_HOST=localhost
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD=
DB_DATABASE=angular_press
JWT_SECRET=your-secret-key
JWT_EXPIRATION=7d
PORT=3000
CORS_ORIGIN=http://localhost:4200Frontend (environment.ts)
export const environment = {
production: false,
apiUrl: 'http://localhost:3000/api'
};- Build Specification - Detailed project requirements
- Docker Setup Guide - Comprehensive Docker documentation
- API Setup Guide - Backend API documentation
- Fork the repository
- Create a feature branch
- Make your changes
- Write/update tests
- Ensure all tests pass
- Submit a pull request
This project is licensed under the MIT License.
For issues and questions:
- Check the documentation
- Review existing issues
- Create a new issue with details
Built with β€οΈ using TypeScript