A full-stack application for tracking your comic book collection with user authentication and a RESTful API.
- User Authentication - JWT-based authentication with secure cookie storage
- API Documentation - Interactive Swagger/OpenAPI documentation
- Database - SQLite with Sequelize ORM
- TypeScript - Fully typed codebase for better developer experience
- Logging - Structured logging with Winston
comics-tracker/
├── api/ # Backend API
│ ├── controllers/ # Route controllers
│ │ └── auth.ts # Authentication endpoints
│ ├── models/ # Database models
│ │ └── User.ts # User model
│ ├── types/ # TypeScript type definitions
│ │ └── UserAttributes.ts
│ ├── utils/ # Utility functions
│ │ └── logger.ts # Winston logger config
│ ├── db.ts # Database configuration
│ ├── index.ts # Express app entry point
│ ├── swagger.ts # Swagger/OpenAPI config
│ └── package.json # API dependencies
├── frontend/ # Angular frontend application
│ ├── src/
│ │ ├── app/ # Angular app components
│ │ │ ├── components/ # UI components
│ │ │ ├── services/ # API services
│ │ │ ├── models/ # TypeScript models
│ │ │ ├── guards/ # Route guards
│ │ │ └── interceptors/ # HTTP interceptors
│ │ └── environments/ # Environment configs
│ └── package.json # Frontend dependencies
├── docs/ # Documentation
│ ├── api/ # API documentation
│ ├── development/ # Development workflow docs
│ ├── guides/ # User guides and tutorials
│ ├── security/ # Security-related documentation
│ └── updates/ # Project updates and changelogs
├── .gitignore
├── LICENSE
└── README.md
- Node.js with Express.js - Web framework
- TypeScript - Type-safe JavaScript
- Sequelize - ORM for database operations
- SQLite - Lightweight database
- JWT - JSON Web Tokens for authentication
- Swagger/OpenAPI - API documentation
- Winston - Logging library
- Angular 20 - Modern web framework
- TypeScript - Type-safe development
- RxJS - Reactive programming
- SCSS - Advanced styling
- Server-Side Rendering (SSR) - Improved performance and SEO
- Node.js (v16 or higher)
- npm or yarn
-
Clone the repository
git clone https://github.com/ryanburgess173/comics-tracker.git cd comics-tracker -
Install dependencies
# Install root dependencies npm install # Install API dependencies cd api npm install cd .. # Install frontend dependencies cd frontend npm install cd ..
-
Set up environment variables
Create a
.envfile in theapidirectory:PORT=3000 JWT_SECRET=your_secret_key_here NODE_ENV=development
-
Run database migrations
npm run migrate
-
(Optional) Seed the database with sample data
npm run seed
This creates:
- Default admin account (
admin@comics-tracker.com/Admin123!) - Sample publishers (Marvel, DC, Image, etc.)
- Comic universes and creators
- Sample comic book data
- Default admin account (
-
Build the TypeScript code
npm run build
-
Start the server
npm start
The API will be running at http://localhost:3000
- Start the frontend (in a new terminal)
cd frontend npm start
The frontend will be running at http://localhost:4200
Once the server is running, visit the interactive API documentation:
Swagger UI: http://localhost:3000/api-docs
For detailed setup and usage information, see API Documentation
GET /- API status check
POST /auth/register- Register a new userPOST /auth/login- Login and receive JWT tokenGET /auth/test- Test authentication endpoint
The application uses SQLite with Sequelize ORM. Database schema is managed through migrations for version control and safe schema updates.
Run migrations to set up your database schema:
cd api
npm run migrate # Run all pending migrations
npm run migrate:status # Check migration status
npm run migrate:undo # Rollback last migrationFor detailed migration guide, see Database Migrations Documentation
- User - User accounts with authentication
- Comic - Individual comic books
- Run - Comic series/runs
- Universe - Comic universes (Marvel, DC, etc.)
- Publisher - Comic publishers
- Creator - Authors and artists
- Omnibus - Collected editions
- TradePaperback - Trade paperback collections
The API uses JWT (JSON Web Tokens) for authentication. After logging in, the token is:
- Returned in the response body
- Set as an HTTP-only cookie (
access_token)
This project maintains comprehensive documentation organized by category:
Complete guide to the documentation structure and organization.
- CI/CD Pipeline - Continuous integration and deployment workflows
- GitHub Actions - Automated linting and testing
- Testing Guide - How to write and run tests
- Security Linting - Security rules and vulnerability detection
- Password Security - Best practices for password handling
- Swagger Setup - Interactive API documentation setup
- Updates - Project updates and version history
Root directory:
npm run lint- Run ESLint on API and Frontendnpm run lint:fix- Auto-fix linting issuesnpm run lint:security- Run security-focused lintingnpm run format- Format code with Prettiernpm run format:check- Check code formattingnpm test- Run API tests
In the api directory:
npm run build- Compile TypeScript to JavaScriptnpm start- Run the compiled applicationnpm test- Run test suite with coverage
In the frontend directory:
npm start- Start Angular dev server (http://localhost:4200)npm run build- Build for productionnpm test- Run Angular testsnpm run lint- Lint frontend codenpm run lint:fix- Auto-fix frontend linting issues
- TypeScript for all source code
- Build output goes to
/api/out(git-ignored) - Use the Winston logger for all logging
- Follow RESTful API design principles
- All code must pass ESLint and Prettier checks
- Security linting enforces best practices
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the terms in the LICENSE file.
- Add comic book models and endpoints
- Create frontend application (Angular 20)
- Implement comic collection management UI
- Add search and filter capabilities
- Add user profile management
- Implement image upload for comic covers
- Add wishlist functionality
- Export/import collection data
Ryan Burgess
- GitHub: @ryanburgess173
- Express.js community
- Swagger/OpenAPI for excellent API documentation tools
- Sequelize ORM for simplified database operations