Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/theoheneba/codevault


https://github.com/theoheneba/codevault

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

Sure! Here's the entire formatted README.md content ready to be copied and pasted into your README.md file on your GitHub repository:

```markdown
# Code Snippet Manager

A simple and efficient system for storing, organizing, and retrieving code snippets.

## Features

- Store code snippets with syntax highlighting
- Organize snippets by language and tags
- Quick search functionality
- Copy snippets to clipboard
- Share snippets via unique URLs
- Access control and user management
- Syntax highlighting for 100+ programming languages

## Quick Start

### Installation

```bash
git clone https://github.com/username/code-snippet-manager
cd code-snippet-manager
npm install
```

### Set up environment variables

```bash
echo "DATABASE_URL=your_database_url
JWT_SECRET=your_jwt_secret
CORS_ORIGIN=http://localhost:3000" > .env
```

### Database setup

```bash
npm run migrate
npm run seed
```

### Start development server

```bash
npm run dev
```

### Build for production

```bash
npm run build
npm start
```

## API Reference

### Snippets

- `GET /api/snippets` - List all snippets
- `POST /api/snippets` - Create new snippet
- `GET /api/snippets/:id` - Get snippet by ID
- `PUT /api/snippets/:id` - Update snippet
- `DELETE /api/snippets/:id` - Delete snippet

### Auth

- `POST /api/auth/register` - Register new user
- `POST /api/auth/login` - Login user
- `POST /api/auth/logout` - Logout user

## Models

### Snippet

```json
{
"id": "string",
"title": "string",
"code": "string",
"language": "string",
"tags": ["string"],
"description": "string?",
"userId": "string",
"created_at": "Date",
"updated_at": "Date"
}
```

### User

```json
{
"id": "string",
"username": "string",
"email": "string",
"created_at": "Date"
}
```

## Configuration

```json
{
"port": 3000,
"database": {
"url": "process.env.DATABASE_URL",
"pool": { "min": 2, "max": 10 }
},
"jwt": {
"secret": "process.env.JWT_SECRET",
"expiresIn": "24h"
}
}
```

## Stack

- Frontend: React.js, TypeScript, TailwindCSS
- Backend: Node.js, Express.js
- Database: PostgreSQL
- Auth: JWT
- Code Highlighting: Prism.js

## Development Commands

- `npm run dev` - Start development server
- `npm test` - Run tests
- `npm run lint` - Run linting
- `npm run build` - Build for production
- `npm start` - Start production server

## Contributing

1. Fork the repository
2. Create feature branch (`git checkout -b feature/amazing-feature`)
3. Commit changes (`git commit -m 'Add amazing feature'`)
4. Push to branch (`git push origin feature/amazing-feature`)
5. Open Pull Request

## License

MIT License. See LICENSE file.

## Support

- Email: [email protected]
- Facebook: Oheneba Kumi-Prempeh

## Acknowledgments

- Prism.js
- React.js
- All contributors
```

You can copy and paste this content directly into your README.md file.