(pronounced as nulls, NUHLZ)
A web application for mood tracking, built with Go (backend) and Angular (frontend).
This is a pet project, focusing on simplicity and ease of development. Written for fun. It is not intended for production use (you can use it in production, but do so at your own risk).
- Track and manage mood entries
- Angular frontend
- RESTful Go backend
- Simple local development and build workflow
- Go 1.25
- Node.js 20.x
- See the Makefile for available commands.
- Backend and frontend are managed in their respective directories.
- Start the backend server (no hot-reloading):
cd backend go run cmd/server/main.go
- Start the frontend development server:
cd frontend npm ci ng serve
- Open your browser and navigate to
http://localhost:4200
to access the application.
- Build the binary
make release
- Run the built binary:
PRODUCTION=true ./null3-server
- Open your browser and navigate to
http://localhost:8080
to access the application.
Environment variables can be set in the .env
file.
ADDRESS
is used to set the backend server address. Default islocalhost:8080
.ENABLE_CORS
is used to enable CORS. Default isfalse
.FRONTEND_URL
is used to set the URL of the frontend application (needed for CORS). Default ishttp://localhost:4200
. Not applicable ifENABLE_CORS
is set tofalse
.PRODUCTION
is used to set the application to production mode. Default isfalse
.JWT_SECRET
is used to sign JWT tokens. Default is generated randomly. Required ifPRODUCTION
is set totrue
.JWT_EXPIRATION
is used to set the JWT token expiration time in seconds. Default is24h
. Must be a positive duration.REFRESH_TOKEN_EXPIRATION
is used to set the refresh token expiration time. Default is168h
(7 days). Must be a positive duration.SECURE_COOKIES
is used to enable secure cookies. Default isfalse
. Set totrue
in production environments to ensure cookies are only sent over HTTPS.DATABASE_URL
is used to configure the SQLite database. Default isfile:null3.db?_fk=1
.LOG_LEVEL
is used to set the logging level. Default isinfo
. Options aredebug
,info
,warn
anderror
.LOG_FORMAT
is used to set the logging format. Default istext
. Options arefancy
,text
andjson
.ENABLE_FRONTEND_DIST
is used to enable serving the frontend from the backend. Default isfalse
.API_URL
is used to replace the%%API_URL%%
placeholder in the frontend build with the actual API URL. Default ishttp://localhost:8080/api
. Not applicable ifENABLE_FRONTEND_DIST
is set tofalse
.
Until user management is implemented, stub user is used:
- userID:
1
. - login:
admin
. - password:
password
. - email:
[email protected]
.
- Implement user management (registration, login, password reset)
- Remove user data set from the environment variables
- Add more home page features (e.g., mood statistics, charts)
- Improve error handling and logging
MIT