Work in progress.
Organize and analyze your X platform activity using AI-powered themes and insights.
Stay in control of your online engagement with smart categorization, analytics, and privacy-first design.
- Smart Categorization: AI-powered theme detection to automatically group your activities (posts, reposts, likes, bookmarks).
- Insightful Analytics: Visualize patterns in your engagement with a theme chart and content overview.
- Privacy First: Your data is encrypted and never shared without permission.
- Authentication: Secure login using NextAuth to connect with X and manage your account.
- Getting Started
- Project Structure
- Environment Variables
- Installation
- Running the Project
- Available Scripts
- Technology Stack
- Contributing
- License
To get a local copy of the project up and running, follow these steps:
Ensure you have the following installed:
- Node.js (v18+)
- npm or yarn
- Git for version control
Create a .env
file at the root of the project and add the following variables:
# API URLs (Production URLs required for deployment)
NEXT_PUBLIC_API_URL=<your-api-url>
NEXT_PUBLIC_APP_URL=<your-app-url>
# Authentication Secrets
X_CLIENT_ID=<your-client-id>
X_CLIENT_SECRET=<your-client-secret>
# NextAuth secret (required for authentication)
NEXTAUTH_SECRET=<your-secret>
Clone the repository and install the dependencies:
# Clone the repository
git clone https://github.com/bjorndavidhansen/x-ai_companion.git
# Navigate into the project directory
cd x-ai_companion
# Install dependencies
npm install
To start the development server:
npm run dev
This will start the server at http://localhost:3000
. You can now open this URL in your browser to see the app in action.
To build the app for production:
npm run build
npm start
The production build is optimized and ready to be deployed.
├── app/ # Next.js pages and layouts
│ ├── dashboard/ # Dashboard page displaying user insights
│ └── page.tsx # Home page with login CTA
├── components/ # Reusable UI components
│ └── ui/ # UI components (buttons, cards, modals, etc.)
├── hooks/ # Custom React hooks for data fetching and state management
├── lib/ # Helper utilities, authentication, and type guards
├── public/ # Static assets (e.g., images)
├── styles/ # Global CSS and Tailwind configuration
└── .env.example # Sample environment configuration
Here are the scripts you can use during development:
Script | Description |
---|---|
npm run dev |
Starts the development server. |
npm run build |
Builds the app for production. |
npm run start |
Runs the app in production mode. |
npm run lint |
Lints the code for errors. |
npm run lint:fix |
Fixes any linting issues. |
npm run type-check |
Checks for TypeScript type errors. |
npm run format |
Formats the code with Prettier. |
- Frontend Framework: Next.js
- Styling: Tailwind CSS
- Authentication: NextAuth
- UI Components: Radix UI, Lucide React
- State Management: React hooks (useState, useEffect)
- Validation: Zod for schema validation
- Type Safety: TypeScript
Contributions are welcome! Follow these steps to contribute:
- Fork the project.
- Create a new branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -m 'Add a cool feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.
- Stock Photos: Unsplash
- Icons: Lucide React
- UI Components: Radix UI
Created by Bjorn David Hansen.
Feel free to reach out if you have any questions or feedback!