This is a Next.js application for deal sourcing and management. Follow the instructions below to get started.
- Docker must be installed on your system
- Node.js and npm
- Clone the repository:
git clone <repository-url>
cd bitrix-deal-sourcing
- Set up environment variables:
cp .env.example .env
To configure Google authentication, set the following environment variables in your .env
file:
Variable Name | Description | Required | Default Value |
---|---|---|---|
GOOGLE_CLIENT_ID |
Your Google application's Client ID. Obtain this from the Google Developer Console. | Yes | None |
GOOGLE_CLIENT_SECRET |
Your Google application's Client Secret. Obtain this from the Google Developer Console. | Yes | None |
Instructions:
-
Obtain Google OAuth Credentials:
- Navigate to the Google Developer Console.
- Create a new project or select an existing one.
- Go to the "Credentials" section and create OAuth 2.0 credentials.
- Note down the generated
Client ID
andClient Secret
.
-
Set Up Your
.env
File:- Create a
.env
file in the root directory of your project if it doesn't exist.
- Create a
DATABASE_URL
: PostgreSQL connection stringAI_API_KEY
: Your OpenAI API key (not required)- Add the following lines, replacing the placeholder values with your actual credentials:
GOOGLE_CLIENT_ID=your-google-client-id GOOGLE_CLIENT_SECRET=your-google-client-secret
- Save the
.env
file. Ensure this file is not committed to version control by adding.env
to your.gitignore
file.
- Add the following lines, replacing the placeholder values with your actual credentials:
Note: For security reasons, never share your actual GOOGLE_CLIENT_ID
or GOOGLE_CLIENT_SECRET
publicly or commit them to version control. Use the .env
file to manage these sensitive credentials securely.
- Start the PostgreSQL database using Docker:
docker compose up
This will start the PostgreSQL database container on port 5432.
- Install dependencies:
npm install
- Initialize the database:
# Generate Prisma client
npx prisma generate
# Push the database schema
npx prisma db push
# Seed the database with initial data
npx prisma db seed
Note: Make sure your package.json
includes the seed script configuration:
Create a seed file at prisma/seed.ts
to define your initial data:
- Start the development server:
npm run dev
The application will be available at http://localhost:3000
npm run dev
- Start the development server with Turbopacknpm run build
- Build the application for productionnpm run start
- Start the production servernpm run lint
- Run ESLint for code linting
npx prisma studio
- Open Prisma Studio to manage database recordsnpx prisma generate
- Generate Prisma Client after schema changesnpx prisma migrate dev
- Create and apply new migrations
/app
- Next.js application routes and components/prisma
- Database schema and migrations/components
- Reusable React components/lib
- Utility functions and configurations
- Next.js 15.0
- PostgreSQL (via Docker)
- Prisma ORM
- Firebase Authentication
- OpenAI Integration
- Tailwind CSS with shadcn/ui components
- Create a new branch for your feature
- Make your changes
- Submit a pull request
[Add your license information here]