Welcome to the documentation. This guide will help you get started with MatureStack.
One important thing to note is, as MatureStack encourages to split frontend and backend you will be working on two repositories.
git clone https://github.com/maturestack/maturestack-frontend.git
git clone https://github.com/maturestack/maturestack-backend.git
Create a .env
file in the root directory of the maturestack-frontend:
NEXT_PUBLIC_API_URL=http://localhost:3000/api/
Create a .env
file in the root directory of the maturestack-backend:
PORT=3000
URL=http://localhost
JWT_SECRET=secret
DATABASE_URL=mongodb://${{USERNAME}}:${{PASSWORD}}@${{HOSTNAME}}:27017
DATABASE_NAME=maturestack
You can use the following command to generate a JWT_SECRET for yourself
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
You can use the any of your favorite package manager though I prefer using yarn
cd maturestack-frontend
yarn
cd ..
cd maturestack-backend
yarn
You need to have two terminals to get everything going as we have two repos
Frontend:
cd maturestack-frontend
yarn dev
Backend:
cd maturestack-backend
yarn start:dev
Make sure that you have the correct url in the above envs matching on which port the backend is running
Frontend
maturestack-frontend/
├── public # Static assets
├── src # Main directory
├── app # Next.js app directory
├── components # Reusable React components
├── hooks # Reusable React hooks
├── lib # Reusable helper functions
├── providers # Global React providers
└── services # Reusable services like API Client
Backend
maturestack-backend/
├── src
├── app.module.ts # NestJS main app module
├── auth # Module handling sign up and login
├── config # Configuration mapping from envs
├── dectorators # Reusable decorators
├── email # Module to send emails
├── factories # Reusable factories for decorators
├── main.ts # Setup of global headers
├── pipelines # Reusable pipelines e.g. Validation
├── tenant # Multi tenant module (if required)
└── users # Module for all user related interactions
If you encounter any issues:
.next
cache:rm -rf .next
For more detailed information, please refer to our other documentation sections or open an issue on GitHub.