Skip to content

Minimal alternative to Google Analytics based on Vue.js and MongoDB.

License

Notifications You must be signed in to change notification settings

Klaymr/aofuji-analytics

 
 

Repository files navigation

Aofuji Analytics

Introduction

Minimal alternative to Google Analytics based on Vue.js and MongoDB.

Preview Image

About the Project

This project does not use semantic versioning until v1 is officially released, so please check the changelog carefully before each upgrade to see if it is still working properly.

About Vue.js

Vue.js is in the transition phase from v2 to v3, and the project will continue to be based on v2 temporarily because the adaptation of the community ecosystem is not stable yet.

Getting Started

Go to documentation site for detailed instructions.

Installation

Get Source

git clone https://github.com/dsrkafuu/aofuji-analytics.git
cd aofuji-analytics

Checkout the latest release after cloned:

git checkout v0.1.0

You can get the latest release tag at release page.

Setup Environment Variables

Create a .env.production file and set the only required environment variable DATABASE_URL. If you're using a locally installed MongoDB server, your setup looks like this:

echo "DATABASE_URL=mongodb://username:password@localhost:27017/dbname" > .env.production

Check out the Environment Variables for more optional variables.

Install Deps and Build

npm ci
npm run build

Start Application

npm start

When the server starts up at port 3000, you can expose it directly to the public network (not recommended) or provide it to a reverse proxy.

Update Application

Fetch Latest Source

git fetch
git checkout v0.1.1 # latest tags will show in terminal when fetch

Update Deps and Build

npm ci
npm run build
npm start

Contribute

Local Development

First you need to fork this repo and clone it.

Then create a .env.development then set the development environment variables above. Check the Environment Variables section for more details.

After these, you can simply:

npm install
npm run dev

Local MongoDB server is also needed.

Code Style

This project uses husky and lint-staged to format source code, so the git commands may be slow due to the Prettier formatting workflow.

Options API Props Order

render
name => components
props => data => computed => watch
lifecycle functions
methods

SCSS Scopes

All basic components in @/components should not use scoped styles, styles of those needs to be named like a-component-ctx.

Alternatively, all view components in @/views should use scoped styles.

License

This project is released under MIT License, for more information read the LICENSE.

Copyright © 2020-present DSRKafuU (https://dsrkafuu.su)

About

Minimal alternative to Google Analytics based on Vue.js and MongoDB.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 50.8%
  • Vue 46.1%
  • SCSS 2.6%
  • Other 0.5%