A full-featured activity tracking web application with user authentication, activity management, and progress visualization. Built with modern web technologies, Actrac helps users track their activities and progress toward goals.
- Features
- Demo
- Tech Stack
- Project Structure
- Getting Started
- Usage
- API Endpoints
- Database Schema
- Development
- Deployment
- Contributing
- License
- Acknowledgements
- π User Authentication: Secure signup and login with password hashing
- π― Activity Tracking: Add, edit, and delete activities with detailed information
- π Progress Visualization: Real-time statistics and progress tracking
- π Light/Dark Mode: Toggle between light and dark themes with persistent preferences
- π± Responsive Design: Works on all device sizes
- π¨ Modern UI: Glass-morphism design with smooth animations
- π Goal Tracking: Visual progress toward 100 activity points
- β¨ Achievements: Celebration animations when reaching goals
Login Page Dashboard with Statistics Activity Management Interface
- HTML5: Markup language for structuring the web page
- CSS3: Styling with Flexbox, Grid, and modern features
- Vanilla JavaScript (ES6+): Client-side scripting without frameworks
- Responsive Design: Media queries for all device sizes
- Node.js: JavaScript runtime environment
- Express.js: Web application framework for REST APIs
- SQLite: Lightweight database for data storage
- Bcrypt: Password hashing for security
- npm: Package manager for Node.js dependencies
- RESTful API Architecture: Clear separation between frontend and backend
Actrac/
|
βββ server.js # Main server file
βββpackage.json # Node.js dependencies
βββ db.sqlite # SQLite database file
βββ index.html # Main dashboard page
βββ login.html # Authentication page
βββ script.js # Main application logic
βββ auth.js # Authentication logic
βββ styles.css # Styling for the entire application
- Node.js (v14 or higher)
- npm (comes with Node.js)
- Git (for version control)
Note: This application does not require any API keys or external services. All functionality is self-contained.
- Clone the repository:
git clone https://github.com/yourusername/actrac.git
cd actrac- Install backend dependencies:
cd Backend
npm install- The following packages will be installed automatically:
- express
- cors
- sqlite3
- bcrypt
- Start the backend server:
cd Backend
node server.js-
The server will start on
http://localhost:3001 -
Open your browser and navigate to
http://localhost:3001/login.htmlto access the application
- Sign Up: Create a new account with username, email, and password
- Log In: Use your credentials to access your dashboard
- Add Activities: Fill in activity details including name, points, date, host, and description
- Track Progress: View real-time statistics and progress toward your 100-point goal
- Manage Activities: Edit or delete existing activities
- Toggle Themes: Switch between light and dark modes using the theme toggle
- Log Out: Securely log out when finished
POST /register- User registrationPOST /login- User login
GET /activities- Retrieve all user activitiesPOST /activities- Create a new activityPUT /activities/:id- Update an existing activityDELETE /activities/:id- Delete an activity
GET /total- Get user's total pointsGET /stats- Get detailed statisticsGET /health- Health check endpoint
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
email TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE activities (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
name TEXT NOT NULL,
points INTEGER NOT NULL,
date TEXT,
host TEXT,
description TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users (id)
);The application follows a Single Page Application (SPA) architecture with an API-first approach:
- Frontend: Vanilla JavaScript with modular components
- Backend: RESTful API with Express.js
- Database: SQLite with proper relationships
- User Authentication: Secure login/signup with password hashing
- Activity Management: Full CRUD operations for activities
- Statistics Dashboard: Real-time progress tracking
- Theme Management: Light/dark mode with localStorage persistence
- Responsive Design: Mobile-first approach with media queries
-
Color Palette:
- Primary:
#6B3F69(Violet) - Secondary:
#A376A2(Light Violet) - Accent:
#DDC3C3(Soft Pink) - Dark Mode:
#1A1A2E(Dark Blue) background with#CAB3D6(Dusty Violet) text
- Primary:
-
Animations: CSS animations for hover effects, loading states, and transitions
-
Glass-morphism: Modern UI design with backdrop filters and transparency
- Ensure all dependencies are installed:
cd Backend
npm install --production- Set environment variables (if needed):
PORT=3001- Start the server:
node server.js- Heroku: Deploy with the Heroku CLI
- DigitalOcean: Use App Platform for easy deployment
- AWS: Deploy with Elastic Beanstalk
- Vercel: For frontend hosting (backend needs separate deployment)
- Render: For monolithic deployment to run the frontend as well as backend as a unit web service(currently using)
PORT: Server port (default: 5000)
Contributions are welcome! Here's how you can contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow the existing code style
- Write clear commit messages
- Test your changes thoroughly
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
- Express.js - Fast, unopinionated, minimalist web framework for Node.js
- SQLite - Lightweight database engine
- Bcrypt - Library for password hashing
- Google Fonts - Inter font family
- Inspiration from modern UI/UX design principles
Made with (β'β‘'β)