The European Union is based on a number of founding treaties, which have been amended over the years. These are the primary legislation of the EU. The different institutions of the EU make and issue Regulations, Directives, Decisions and Recommendations, and these are known as secondary legislation. The official published source for these materials is the Official Journal of the European Union.
EUR-Lex is the official online portal for EU law, and includes full text access to treaties and legislation, and the Official Journal from 1952.