Installations
npm install @baselinejs/core
Developer Guide
Typescript
No
Module System
N/A
Min. Node Version
>=20
Node Version
20.18.0
NPM Version
10.9.2
Score
75.7
Supply Chain
99
Quality
94
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (47.86%)
Shell (25.27%)
SCSS (14.91%)
JavaScript (10.25%)
HTML (1.71%)
Developer
Download Statistics
Total Downloads
4,194
Last Day
1
Last Week
25
Last Month
334
Last Year
4,194
GitHub Statistics
77 Stars
101 Commits
5 Forks
4 Branches
3 Contributors
Package Meta Information
Latest Version
0.0.18
Package Id
@baselinejs/core@0.0.18
Unpacked Size
627.23 kB
Size
351.02 kB
File Count
174
NPM Version
10.9.2
Node Version
20.18.0
Publised On
17 Dec 2024
Total Downloads
Cumulative downloads
Total Downloads
4,194
Last day
-94.4%
1
Compared to previous day
Last week
-88.3%
25
Compared to previous week
Last month
714.6%
334
Compared to previous month
Last year
0%
4,194
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
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 | Documentation | Discord | LinkedIn | YouTube
Startups, want $10k USD of AWS Credits to Get Started? Apply Here
Getting Started
Videos Walkthroughs
Video walkthroughs setting up Baseline
Setup
Quick Start
npx @baselinejs/quickstart
The quick start command will:
- Install all requirements
- Create a new Baseline project
- Set up AWS credentials
- Deploy to staging
- Create an admin user
- Output the URLs for the project
You may need to install npm if npx is not available, you can do this by installing Node.js
Setup
If you prefer a more manual setup, follow the steps below.
- Install requirements
pnpm run install:requirements
npx @baselinejs/create-app my-app-name
pnpm install
pnpm run setup
to name your project and set the regionpnpm run aws:profile
to setup your AWS credentials profile (if you have issues please update aws cli)pnpm run deploy:staging
to deploy api/web/adminpnpm run add:user:staging
to add an admin user to the applicationpnpm run urls:staging
To see your project URLs
Local Requirements
These must be installed before following the setup instructions. These can be installed manually or by using the requirements installation script.
- Macos/Linux OS/Windows Subsystem for Linux
- Node.js v20 (v20 or higher) & npm@10.5.0 or higher (we suggest installing and using nvm) 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 https://nodejs.org/en/download/ 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
- If nvm is installed you can switch versions with
- pnpm version 9, version can be checked with
pnpm -v
, install withnpm install -g pnpm@9
or other methods - AWS CLI v2
- Homebrew, for Mac users only, follow install instructions here
- jq for extracting Cloudformation outputs
- Install on mac
brew install jq
- Install on Linux
sudo yum install jq
orsudo apt-get install jq
, or other appropriate methods
- Install on mac
- Java Runtime Environment (JRE) version 8.x or newer, it is only required for DynamoDB local
- Install on mac
brew install java
- Install on linux
sudo yum install java
orsudo 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
- Install on mac
- curl which is used in some of the bash scripts, curl install instructions
- An IDE such as Visual Studio Code
- Node.js v20 (v20 or higher) & npm@10.5.0 or higher (we suggest installing and using nvm) 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.
- Internet connectivity
- AWS Account https://aws.amazon.com/getting-started/
- IAM credentials https://docs.aws.amazon.com/cli/latest/userguide/getting-started-prereqs.html#getting-started-prereqs-iam be sure to follow Security best practices in IAM
Requirements Installation
Run the following command to install the requirements.
If you are starting a new Baseline project.
1curl -o- https://raw.githubusercontent.com/Baseline-JS/core/main/scripts/install-requirements.sh | bash
or
1wget -qO- https://raw.githubusercontent.com/Baseline-JS/core/main/scripts/install-requirements.sh | bash
If you are joining an existing Baseline project make sure you run the requirements installation script in the root of the project. This will install the requirements for the project.
1pnpm 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.
pnpm run generate:env:local
to generate the env files for the frontend clientspnpm run start:api
pnpm run start:admin
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 byAUTHORIZER
inpackages/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.
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/GitHub 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
No vulnerabilities found.
No security vulnerabilities found.