A modern, feature-rich starter template for full-stack web development.
- Frontend: React with TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Backend: Express.js with TypeScript
- Project Structure: NX monorepo
- Code Concatenation: Python script for LLM context preparation
- Documentation: Separate folder for project requirements and specifications
- Authentication: JWT-based authentication with refresh tokens
- User Profiles: Ability to view and update user profiles
- Node.js (v14 or later)
- Python 3.x (for concatenator script)
-
Clone the repository:
git clone https://github.com/yourusername/basic-starter.git cd basic-starter
-
Install dependencies:
npm install
-
Set up environment variables:
- Copy the .env.example file to .env
- Update the DATABASE_URL with your PostgreSQL connection string
- Set JWT_SECRET and JWT_REFRESH_SECRET for authentication
- Run database migrations:
npx prisma migrate dev
Use NX commands to run various parts of the application:
-
Start the frontend development server:
npx nx serve basic-starter
-
Start the backend development server:
npx nx serve api
-
Build the project:
npx nx build basic-starter
-
Build the api
npx nx build api
-
Run tests:
npx nx test basic-starter
The project now includes JWT-based authentication with the following endpoints:
- POST /auth/register: Register a new user
- POST /auth/login: Login and receive access and refresh tokens
- POST /auth/refresh: Refresh the access token using a valid refresh token
For detailed API documentation, refer to the Swagger UI available at /api-doc
s when running the backend server.
The project now includes user profile functionality with the following endpoints:
- GET /api/profile: Retrieve the authenticated user's profile
- PUT /api/profile: Update the authenticated user's profile
For detailed API documentation, refer to the Swagger UI available at /api-docs
when running the backend server.
The concatenator is a Python script that combines all project files into a single text file. This is useful for providing context to Large Language Models (LLMs) for code analysis and generation tasks.
-
Navigate to the
lib/scripts
directory:cd lib/scripts
-
Run the concatenator:
python concatenator.py --root ../../
-
Find the output file (e.g.,
concatenated_main_20240908_191552.txt
) in the project root.
This project uses shadcn/ui for UI components. To add new components:
-
Run the shadcn CLI:
npx shadcn-ui@latest add <component-name>
-
Import and use the component in your React files:
import { Button } from '@/components/ui/button';
This project uses PostgreSQL with Prisma ORM. Follow these steps to set up your database:
-
Ensure you have PostgreSQL installed and running on your system.
-
Create a new PostgreSQL database for the project.
-
Copy the
.env.example
file to.env
and update theDATABASE_URL
with your PostgreSQL connection string:
DATABASE_URL="postgresql://username:password@localhost:5432/your_database_name"
- Run Prisma Migrate to create the database schema:
npx prisma migrate dev --name dev
- (Optional) Seed the database with initial data:
The /documentation
folder contains important project-related documents:
requirements.md
: Detailed project requirements and specifications- Other documentation files related to project architecture, design decisions, and development guidelines
Refer to these documents for in-depth information about the project's structure, goals, and development practices.
This project is licensed under the MIT License.