The Sensei AI project is an all-in-one AI-powered software platform designed to provide multiple functionalities, including AI-based chat, code generation, image generation, video processing, music generation, and more. This project leverages modern web technologies and TypeScript to deliver a seamless and scalable experience.
- User Authentication: Sign-in and sign-up functionality.
- Dashboard: Centralized UI for managing all AI functionalities:
- AI Chat
- Code Generation
- Image Generation
- Video Processing
- Music Generation
- Settings and customizations
- Landing Page: A beautifully designed marketing page.
- Responsive UI: Built with reusable components and fully responsive layouts.
- Integration with AI Models: Seamless backend APIs for AI functionalities.
- Payment API: Integration with MPesa for handling subscriptions and payments.
Here are some screenshots of the live webapp in action
- Frontend: React (with Next.js)
- Backend: TypeScript, Next.js API routes
- Database: Prisma ORM (likely using PostgreSQL, MySQL, or another database)
- Styling: Tailwind CSS
- Others: ESLint, PostCSS, Crisp Chat integration
Here's a high-level overview of the folder structure:
app/
: Main application code for routes and layouts.auth/
: Handles user authentication routes (sign-in, sign-up).dashboard/
: Contains the dashboard layout and routes for features like chat, code, image, video, and music.landingpage/
: Landing page components.api/
: Backend API routes for handling AI functionalities and payments.
components/
: Reusable UI components (e.g., buttons, modals, avatars).hooks/
: Custom React hooks for managing state and modals.lib/
: Helper utilities, including database configuration and API limiters.prisma/
: Database schema definition.public/
: Static assets (e.g., images, icons).styles/
: Global styles and configurations (viaglobals.css
).- Root files:
next.config.ts
: Next.js configuration.tailwind.config.ts
: Tailwind CSS configuration.middleware.ts
: Middleware for request handling.
- Node.js: Ensure Node.js v14 or higher is installed.
- Package Manager: Use
npm
oryarn
. - Database: Ensure your database (e.g., PostgreSQL) is set up and running.
-
Clone the repository:
git clone https://github.com/kc-clintone/Sensei-ai_saas.git cd Sensei-ai_saas
-
Install dependencies:
npm install
-
Configure the environment:
- Create a
.env
file in the root directory. - Add the required environment variables (e.g., database URL, API keys).
- Create a
-
Set up the database:
npx prisma migrate dev
-
Run the development server:
npm run dev
-
Open the app in your browser:
http://localhost:3000
- Landing Page: View the app's main marketing page.
- Authentication: Sign in or sign up to access the dashboard.
- Dashboard: Interact with AI features like chat, code generation, image creation, and more.
- Settings: Customize your user preferences.
Below are some of the available API routes:
- Chat API:
POST /api/chat
– Send and receive AI-generated responses. - Code API:
POST /api/code
– Generate code snippets based on prompts. - Image API:
POST /api/image
– Create AI-generated images. - Music API:
POST /api/music
– Generate AI-composed music. - Video API:
POST /api/video
– Process and edit videos with AI. - Payment API:
POST /api/mpesa
– Handle subscriptions and payments.
Contributions are welcome! Follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Commit your changes:
git commit -m "Add your message here"
- Push the branch:
git push origin feature-branch
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.