A complete Golang and Nuxt boilerplate for your project with Subscription management system, backend API, frontend, tests and CI/CD pipelines.
- Subscription management system using Stripe API.
- Backend written in Golang using Beego framework.
- Frontend written in NodeJS using NUXT and Vue.js frameworks.
- Material design using Vuetify.
- JSON REST API based on jsonapi.org standard.
- Fully featured user registration, login, password reminder, profile update, 2FA authentication, SMS based mobile confirmation, audit logs ... etc.
- JSON Web Tokens (JWT) based authentication.
- Social login using Facebook, LinkedIn, Google, Github.
- SEO friendly thanks to the NUXT Static Generated (Pre Rendering).
- SQL migration using sql-migrate.
- Rate limiter for API routes to easily set a rate limit per IP for one or more routes.
- Role-based access control (RBAC) for API routes and permissions.
- Pagination implementation for API and frontend with caching.
- Multi-factor authentication using One Time Passwords and mobile SMS code.
- Nice Email templates using Hermes.
- Fully featured admin dashboard based on Vuetify Material Dashboard.
- Beautiful home page based on Veluxi Starter.
- Complete CI/CD pipelines including tests using GitLab .gitlab-ci.yml file.
- Deploy to Heroku using few easy steps.
- Automated development initialization using Docker compose and init file.
- Application Cache using Cachita with support for memory, Redis, database and file cache.
- Dependency injection.
- Backend API integration and unit tests.
- Frontend Jest tests.
- Queue management system using Que.
There are 2 methods to run Skeleton locally
- Install required libs locally on OSX:
./init.sh init
Then Run the frontend and backend servers:
./init.sh
-- OR --
- Run the full stack on Docker:
Note that
yarn install
might take some time.
docker-compose up
# run tests
docker exec -it skeleton_backend_1 /bin/bash -c "go test -v ./... -count=1 | sort -u"
./build.sh
- Fork the Skeleton repository on Gitlab
- Add the following CI/CD environment variables in your Gitlab's CI/CD settings section:
- HEROKU_API_KEY: Your free Heroku API KEY
- PROD_CONFIG_SECRET_FILE (optional): Base64 encoded string of the
./src/backend/conf/app.prod.ini.secret
file. Use the ./src/backend/conf/app.dev.ini.secret.example as an example.
cat "$PROD_CONFIG_SECRET_FILE" | base64
- Run Gitlab pipeline.
- Navigate to your Heroku apps to open your app URL.
- For more information, check .gitlab-ci.yml to review how the production container is being generated in the pipelines.
- Optionally you can also push your final image to Docker Hub by adding your username and password as CI/CD environment variables:
- DOCKER_HUB_USER: docker hub username
- DOCKER_HUB_PASSWORD: docker hub password
Skeleton works in development with MailHog in docker which you can access via http://localhost:8025/. To use MailTrap instead, change ./src/backend/conf/app.dev.ini SMTP config to match MailTrap settings.
cd src/backend
go test -v ./... -count=1 | sort -u
#extra
go test -v backend/controllers -count=1 -debug=7 -run TestUserController_VerifyMobile
#colourfull
go test -v ./... -count=1 | sed ''/PASS/s//(printf "\033[32mPASS\033[0m")/'' | sed ''/FAIL/s//(printf "\033[31mFAIL\033[0m")/''
cd src/frontend
yarn test