An immediately runnable fullstack TypeScript application using React, Express, PostgreSQL, and AWS services (via LocalStack). This project is designed to provide a modern monorepo setup with seamless developer experience and pre-configured services to kickstart development.
- Frontend: React application running on
localhost:3000. - Backend: Express application running on
localhost:8000. - Database: PostgreSQL with pre-configured development database.
- Knex: Uses Knex for migrations and db interactions.
- AWS Services: LocalStack setup for S3 and SQS and anything else!
- Monorepo Setup: Shared codebase and workspace-ready structure.
- Dockerized Development: Fully containerized environment for easy setup and isolation.
- Makefile Commands: Simplified project management with pre-defined tasks for setup, migrations, and more.
Make sure you have the following installed:
- Docker
- Docker Compose
- Node.js (if running scripts outside of containers)
- Make (optional but recommended for using the Makefile)
git clone https://github.com/your-username/fullstack-typescript-mono-repo.git
cd fullstack-typescript-mono-repoBuild and start all services:
make allVisit:
- Frontend: http://localhost:3000
- Backend: http://localhost:8000
Stop all services:
make downStop and remove volumes:
make down-vInstall frontend dependencies:
make install-frontendInstall backend dependencies:
make install-backendRebuild all containers:
make buildRebuild without cache:
make build-no-cacheRebuild only the frontend:
make build-frontendRebuild only the backend:
make build-backendApply database migrations:
make migrateSeed the database with initial data:
make seedDrop and recreate the database, then re-run migrations and seeds:
make resetTo create a new migration file, use the following command:
make migration name=your_migration_name.
├── docker/ # Dockerfiles for base, backend, and frontend
├── packages/ # Application source code
│ ├── backend/ # Backend services (Express API)
│ └── frontend/ # Frontend application (React)
│ └── shared/ # Shared package for types, utils etc...
├── Makefile # Commands for managing the project
├── docker-compose.yml # Docker Compose configuration
└── README.md # Documentation (you're reading this!)
The project comes with default environment variables pre-configured in the docker-compose.yml. Update these values as needed for your development environment:
NODE_ENV: Set todevelopment.DATABASE_URL: Connection string for PostgreSQL.AWS_ENDPOINT: LocalStack endpoint.AWS_REGION: AWS region (default:us-east-1).AWS_ACCESS_KEY_ID: AWS access key (default:test).AWS_SECRET_ACCESS_KEY: AWS secret key (default:test).S3_BUCKET_NAME: Name of the S3 bucket.DB_USER,DB_PASS,DB_NAME,DB_HOST: PostgreSQL credentials.
NODE_ENV: Set todevelopment.
LocalStack is used to emulate AWS services. Currently, the following services are enabled:
- S3: For object storage.
- SQS: For message queuing.
Health checks ensure that required resources (e.g., S3 buckets and SQS queues) are ready before the backend starts.
If a specific container is not running, you can start it individually:
make check_and_start_container NAME=container_nameReplace container_name with the name of the container (e.g., backend, frontend, postgres).
View logs for a specific container:
docker-compose logs container_nameView logs for all containers:
docker-compose logs -fContributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.
Happy coding! 🚀