Analytics Hub is a web application that allows users to sign in with their Google accounts and access their Google Analytics data through a customized dashboard interface. This platform makes analytics data more accessible and actionable compared to Google's standard interface.
- Google Authentication: Users sign in with their Google accounts using OAuth 2.0
- Data Visualization: Custom charts and graphs of Google Analytics metrics
- Personalized Dashboards: Users can create and save custom dashboard layouts
- Multi-User Support: Each user manages their own Google Analytics properties
- Data Insights: Simplified presentation of key metrics with actionable recommendations
This project is built with the T3 Stack:
- Next.js - React framework for building the UI
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- tRPC - End-to-end typesafe API layer
- Prisma - Type-safe ORM for database access
- NextAuth.js - Authentication for Next.js
- Node.js 18+ and npm
- PostgreSQL database
- Google Cloud Platform account with Analytics API access
-
Clone the repository
git clone https://github.com/yourusername/analytics-hub.git cd analytics-hub -
Install dependencies
npm install
-
Set up environment variables
- Copy
.env.exampleto.env - Update the variables with your own values
- For Google OAuth, you'll need to create credentials in the Google Cloud Console
- Copy
-
Set up the database
# Start the PostgreSQL container ./start-database.sh # Push the schema to the database npm run db:push
-
Run the development server
npm run dev
-
Open http://localhost:3000 in your browser
To use the Google Analytics API:
- Create a project in the Google Cloud Console
- Enable the Google Analytics API
- Create OAuth 2.0 credentials
- Add the credentials to your
.envfile
npm run dev- Start the development servernpm run build- Build the production applicationnpm run start- Start the production servernpm run lint- Run ESLintnpm run format:write- Format code with Prettiernpm run db:studio- Open Prisma Studio to manage your database
Follow our deployment guides for:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.