Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Baseline-JS/core
Baseline Core - Serverless First Framework
https://github.com/Baseline-JS/core
aws framework serverless typescript
Last synced: 3 months ago
JSON representation
Baseline Core - Serverless First Framework
- Host: GitHub
- URL: https://github.com/Baseline-JS/core
- Owner: Baseline-JS
- License: mit
- Created: 2024-03-12T01:07:57.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-31T00:52:04.000Z (4 months ago)
- Last Synced: 2024-07-31T03:46:56.623Z (4 months ago)
- Topics: aws, framework, serverless, typescript
- Language: TypeScript
- Homepage: https://baselinejs.com
- Size: 843 KB
- Stars: 69
- Watchers: 0
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - Baseline-JS/core - Baseline Core - Serverless First Framework (TypeScript)
README
![1688515420018](https://github.com/Baseline-JS/core/assets/151841910/620fa869-4bca-418d-af2c-3a3f8b2d2719)
# BaselineJS
BaselineJS is an open-source, fullstack TypeScript, serverless first framework designed to make building cloud native applications easier. Our framework utilizes a combination of modern technologies, architectures and operational processes to help teams to efficiently build and deploy robust applications
If you like BaselineJS give us a βοΈ
[Website](https://baselinejs.com/) |
[Documentation](https://docs.baselinejs.com/) |
[Discord](https://discord.gg/beCj9VDeMm) |
[LinkedIn](https://www.linkedin.com/company/baselinejs) |
[YouTube](https://www.youtube.com/@Baseline-JS)Startups, want $10k USD of AWS Credits to Get Started? [Apply Here](https://share.hsforms.com/1P6p_G9Q_Q-SJAESAYtLftgqm3as)
# Getting Started
## Setup
1. [Install requirements](#local-requirements) `pnpm run install:requirements`
2. `npx @baselinejs/create-app my-app-name`
3. `pnpm install`
4. `pnpm run setup` to name your project and set the region
5. `pnpm run aws:profile` to setup your AWS credentials profile (if you have issues please [update aws cli](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html]))
6. `pnpm run deploy:staging` to deploy api/web/admin
7. `pnpm run add:user:staging` to add an admin user to the application
8. `pnpm run urls:staging` To see your project URLs## Local Requirements
These must be installed before following the setup instructions.
- Macos/Linux OS/Windows Subsystem for Linux
- Node.js v20 (v20 or higher) & [email protected] or higher [(we suggest installing and using nvm)](https://github.com/nvm-sh/nvm#install--update-script) follow instructions in the link to install, you will generally need to create a new terminal session after installing. If you already have nvm update it before proceeding.
- If nvm is installed you can switch versions with `nvm install 20 && nvm use 20 && nvm alias default 20 && nvm install-latest-npm`
- If not using nvm you can manually install node and npm, download from alternatively use the operating system package manager or any other appropriate tool to install node
- Current versions can be checked with `node -v`, `npm -v`
- pnpm version 9, version can be checked with `pnpm -v`, install with `npm install -g pnpm@9` [or other methods](https://pnpm.io/installation)
- [AWS CLI v2](https://aws.amazon.com/cli)
- Homebrew, for Mac users only, follow install instructions [here](https://brew.sh/)
- [jq](https://stedolan.github.io/jq/download/) for extracting Cloudformation outputs
- Install on mac `brew install jq`
- Install on Linux `sudo yum install jq` or `sudo apt-get install jq`, or other appropriate methods
- Java Runtime Environment (JRE) version 8.x or newer, it is only required for [DynamoDB local](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html)
- Install on mac `brew install java`
- Install on linux `sudo yum install java` or `sudo apt-get install openjdk-8-jdk`, or other appropriate methods
- DynamoDB local will automatically install in the project when the api is started, java needs to installed before this occurs
- curl which is used in some of the bash scripts, [curl install instructions](https://everything.curl.dev/get)
- An IDE such as [Visual Studio Code](https://code.visualstudio.com/)
- Internet connectivity
- AWS Account
- IAM credentials be sure to follow [Security best practices in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)### Experimental Requirements Installation
Alternatively, try the experimental requirements installation script. Use at your own risk.
If you are starting a new Baseline project.
```bash
curl -o- https://raw.githubusercontent.com/Baseline-JS/core/main/scripts/experimental-install-requirements.sh | bash
```or
```bash
wget -qO- https://raw.githubusercontent.com/Baseline-JS/core/main/scripts/experimental-install-requirements.sh | bash
```If you are joining an existing Baseline project
```bash
pnpm run install:requirements
```## Run Locally
If the project is already setup and you are trying run the project locally make sure you run `pnpm run aws:profile` first so that you have the correct credentials for AWS configured locally.
### Commands
Start the api, admin and web in their own terminal windows/tabs with the following commands.
1. `pnpm run generate:env:local` to generate the env files for the frontend clients
2. `pnpm run start:api`
3. `pnpm run start:admin`
4. `pnpm run start:web`### Running locally Limitations
- API, Web & Admin: No S3, you will need to rely on AWS staging S3
- API: No local Cognito Authorizer, the deployed staging cognito can be used (see `packages/api/serverless.yml`) or the payload set by `AUTHORIZER` in `packages/api/scripts/run-api-local.sh`.
- Admin: Cognito UI relies on an active AWS Cognito user pool, use deployed staging## Deploy a Change
Swap `staging` to `prod` to deploy to production. All environment variables will be automatically set in the process.
1. `pnpm run deploy:staging` to deploy api/web/admin
## Remove Stack
To destroy the deployed cloudformation stacks so it is no longer on AWS run `pnpm run remove:staging`. This will likely destroy all data associated with the application.
## Major Components
- π API
- π₯οΈ React Admin Website
- π React User Website
- βοΈ CI/CD
- π§ Developer Tooling
- π Authentication
- π Multiple Environments
- π» Run Locally
- ποΈ Infrastructure as Code (IaC)
- π¦ Managed Environment Variables
- β¨ Baseline Commands## Technology
- π Package Management: Pnpm + Monorepo
- π¨ Language & Build: TypeScript + ESBuild
- πΌ Frontend: React + Vite
- βοΈ Backend: NodeJS + Express
- π¨ Linting & Formatting: Prettier + Eslint
- π IaC: AWS + Serverless Framework
- π Deploy: Local & Bitbucket CI/CD## AWS Services
- Cognito
- S3
- Lambda
- DynamoDB
- CloudFormation
- Route53
- Systems Manager
- CloudFront
- API Gateway
- CloudWatch
- SNS## What can you build with Baseline?
- π SaaS Solutions: Build software-as-a-service solutions tailored to your audience.
- π₯οΈ Web Applications: Develop responsive and scalable web applications.
- π Marketplaces: Launch and manage online marketplaces with ease.
- π± Mobile Applications: Create robust mobile apps for iOS and Android platforms.
- πΌποΈ B2B/B2C Applications: Seamlessly cater to both business and consumer audiences.
- ποΈ Headless CMS: Manage content efficiently using a headless content management system.## Benefits
- Serverless First
- Open source
- Full control
- Cost effective implementation
- Hosted in your own AWS account
- Uses popular technology
- Scales on demand
- Staging and production environments
- Runs locally# Baseline
If you would like to learn more about what we do please visit [Baseline](https://baselinejs.com/)